drinkingvideogames/mixer

View on GitHub
api/services/asset/hooks.js

Summary

Maintainability
A
1 hr
Test Coverage
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 }