Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const workLanguagesPromise = revisionPromise.then((revision) =>
bookshelf.knex('bookbrainz.work_data__language')
.transacting(transacting)
.insert(
req.body.languages.map((id) => ({
data_id: revision.related('data').get('id'),
language_id: id
}))
)
);