Added AccessToken created property
This commit is contained in:
parent
1bb95607b9
commit
efce5039f6
|
@ -15,7 +15,8 @@ var Model = require('../loopback').Model
|
|||
var properties = {
|
||||
id: {type: String, generated: true, id: 1},
|
||||
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);
|
||||
} else {
|
||||
data.id = id;
|
||||
|
||||
next();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -15,4 +15,4 @@ module.exports = function(dataSource) {
|
|||
dataSource = dataSource || new require('loopback-datasource-juggler').ModelBuilder();
|
||||
var Role = dataSource.define('Role', RoleSchema);
|
||||
return Role;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue