api/services/asset/hooks.js
const commonHooks = require('../lib/hooks') Identical blocks of code found in 2 locations. Consider refactoring.const before = { create: [ commonHooks.requireAuth(), commonHooks.embellishUser(), commonHooks.setCurrentDateHook('createdAt'), commonHooks.setCurrentDateHook('updatedAt') ], update: [ commonHooks.setCurrentDateHook('updatedAt') ], patch: [ commonHooks.setCurrentDateHook('updatedAt') ]} module.exports = { before }