Added AccessToken created property

This commit is contained in:
Ritchie Martori 2013-11-14 16:47:24 -08:00
parent 1bb95607b9
commit efce5039f6
2 changed files with 4 additions and 2 deletions

View File

@ -15,7 +15,8 @@ var Model = require('../loopback').Model
var properties = { var properties = {
id: {type: String, generated: true, id: 1}, id: {type: String, generated: true, id: 1},
uid: {type: String}, uid: {type: String},
ttl: {type: Number, ttl: true} ttl: {type: Number, ttl: true}, // time to live in seconds
created: {type: Date}
}; };
/** /**
@ -52,6 +53,7 @@ AccessToken.beforeCreate = function (next, data) {
next(err); next(err);
} else { } else {
data.id = id; data.id = id;
next(); next();
} }
}); });