analyse-parrainages/common/models/elu.js

14 lines
317 B
JavaScript
Raw Normal View History

'use strict';
const _ = require('lodash');
module.exports = function(Elu) {
Elu.observe('before save', function filterProperties(ctx, next) {
ctx.instance.firstname = _.upperCase(ctx.instance.firstname.toUpperCase());
ctx.instance.lastname = _.upperCase(ctx.instance.lastname.toUpperCase());
next();
});
};