Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var shortid = require('shortid');
- module.exports = {
- identity: 'admin',
- connection: 'projectDB',
- attributes: {
- id: {
- type: 'string',
- primaryKey: true,
- unique: true,
- defaultsTo: function () {
- return shortid.generate();
- }
- },
- username: {
- type: 'string',
- unique: true,
- required: true
- },
- password: {
- type: 'string',
- required: true
- }
- }
- };
- var bedwetterOptions = {}
- module.exports = [{
- // return all model items
- path: '/admin',
- method: 'GET',
- config: {
- handler: {
- bedwetter: bedwetterOptions
- }
- }
- }, {
- // return a specific model by id
- path: '/admin',
- method: 'POST',
- config: {
- handler: {
- bedwetter: bedwetterOptions
- }
- }
- }
- ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement