Skip to content

Commit

Permalink
refactor: log cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
marco79cgn committed Dec 12, 2023
1 parent bf13594 commit 2856ac6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ingest/events/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ module.exports = async (req, res) => {
const isDtsPluginSet = message.plugins?.find((plugin) => plugin.type === 'dts')
const isMusic = req.body.type === 'music'
const isInDtsAllowList = DTS_INSTITUTION_ALLOW_LIST.includes(req.user.institutionId)
const institutionId = req.user.institutionId || 'unknown'

if (!isDtsPluginSet && isMusic && isInDtsAllowList) {
message.plugins.push({
Expand Down Expand Up @@ -185,7 +184,7 @@ module.exports = async (req, res) => {
// log success
logger.log({
level: 'info',
message: `event processed > ${eventName} > institution ${institutionId} > isInDtsAllowList ${isInDtsAllowList} > ${message.services.length}x services (${message.services[0]?.publisherId})`,
message: `event processed > ${eventName} > ${message.services.length}x services (${message.services[0]?.publisherId})`,
source,
data: { ...data, body: req.body, isDtsPluginSet },
})
Expand Down

0 comments on commit 2856ac6

Please sign in to comment.