UNPKG

generator-sails-rest-api

Version:

Yeoman generator that provides already configured and optimized Sails REST API with bundle of predefined features

22 lines (16 loc) 325 B
"use strict"; /** * <%= name %> * @description :: Model for storing <%= name %> records */ module.exports = { schema: true, attributes: { // Fill your attributes here toJSON() { return this.toObject(); } }, beforeUpdate: (values, next) => next(), beforeCreate: (values, next) => next() };