Run model/controller
This commit is contained in:
30
api/controllers/RunController.js
Normal file
30
api/controllers/RunController.js
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* RunController
|
||||
*
|
||||
* @module :: Controller
|
||||
* @description :: A set of functions called `actions`.
|
||||
*
|
||||
* Actions contain code telling Sails how to respond to a certain type of request.
|
||||
* (i.e. do stuff, then send some JSON, show an HTML page, or redirect to another URL)
|
||||
*
|
||||
* You can configure the blueprint URLs which trigger these actions (`config/controllers.js`)
|
||||
* and/or override them with custom routes (`config/routes.js`)
|
||||
*
|
||||
* NOTE: The code you write here supports both HTTP and Socket.io automatically.
|
||||
*
|
||||
* @docs :: http://sailsjs.org/#!documentation/controllers
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Overrides for the settings in `config/controllers.js`
|
||||
* (specific to RunController)
|
||||
*/
|
||||
_config: {}
|
||||
|
||||
|
||||
};
|
||||
27
api/models/Run.js
Normal file
27
api/models/Run.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Run
|
||||
*
|
||||
* @module :: Model
|
||||
* @description :: A short summary of how this model works and what it represents.
|
||||
* @docs :: http://sailsjs.org/#!documentation/models
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
|
||||
attributes: {
|
||||
creatorName: {
|
||||
type: 'string',
|
||||
required: true
|
||||
},
|
||||
creatorEmail: {
|
||||
type: 'email',
|
||||
required: true
|
||||
},
|
||||
groupEmails: 'String',
|
||||
menuUrl: {
|
||||
type: 'url'
|
||||
},
|
||||
restaurant: 'string'
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user