From a0710d3c7197f23c136c1dd539e6d3f84a4430d7 Mon Sep 17 00:00:00 2001 From: Ben Ramey Date: Sat, 8 Mar 2014 20:57:53 -0600 Subject: [PATCH] Run model/controller --- api/controllers/RunController.js | 30 ++++++++++++++++++++++++++++++ api/models/Run.js | 27 +++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 api/controllers/RunController.js create mode 100644 api/models/Run.js diff --git a/api/controllers/RunController.js b/api/controllers/RunController.js new file mode 100644 index 0000000..dc85141 --- /dev/null +++ b/api/controllers/RunController.js @@ -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: {} + + +}; diff --git a/api/models/Run.js b/api/models/Run.js new file mode 100644 index 0000000..651de0f --- /dev/null +++ b/api/models/Run.js @@ -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' + } + +};