Merge pull request #2974 from strongloop/defaultValue

Remove workaround for default value
This commit is contained in:
Loay 2016-11-28 11:07:09 -05:00 committed by GitHub
commit 3ecb5e1cfe
2 changed files with 2 additions and 7 deletions

View File

@ -34,12 +34,6 @@ var DEFAULT_TOKEN_LEN = 64;
*/
module.exports = function(AccessToken) {
// Workaround for https://github.com/strongloop/loopback/issues/292
AccessToken.definition.rawProperties.created.default =
AccessToken.definition.properties.created.default = function() {
return new Date();
};
/**
* Anonymous Token
*

View File

@ -12,7 +12,8 @@
"description": "time to live in seconds (2 weeks by default)"
},
"created": {
"type": "Date"
"type": "Date",
"defaultFn": "now"
}
},
"relations": {