This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.get('/api/birthday', function (req, res, next) { | |
var month = moment().month() + 1; | |
var today = moment().date(); | |
var tomorrow = moment().add(1, 'days').date(); | |
Costumer.findAll({ | |
attributes: ['id','name','birthDate'], | |
where: { | |
$and: [ | |
sequelize.where(sequelize.fn('month', sequelize.col("birth_date")), month) | |
], |