add user signup through loopback

This commit is contained in:
Berkeley Martinez
2015-06-09 16:43:08 -07:00
parent 39d57db782
commit a8494b29da
10 changed files with 140 additions and 244 deletions

View File

@@ -1,19 +0,0 @@
var debug = require('debug')('freecc:models:user');
module.exports = function(User) {
debug('setting up user hooks');
/*
* NOTE(berks): not sure if this is still needed
User.observe('before save', function setUsername(ctx, next) {
// set username from twitter
if (ctx.instance.username && ctx.instance.username.match(/twitter/g)) {
ctx.instance.username =
ctx.instance.username.match(/twitter/g) ?
ctx.instance.username.split('.').pop().toLowerCase() :
ctx.instance.username;
debug('username set', ctx.instance.username);
}
next();
});
*/
};

View File

@@ -3,6 +3,7 @@
"base": "User",
"trackChanges": false,
"idInjection": true,
"strict": true,
"properties": {
"email": {
"type": "string",