Merge pull request #2974 from strongloop/defaultValue
Remove workaround for default value
This commit is contained in:
commit
3ecb5e1cfe
|
@ -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
|
||||
*
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
"description": "time to live in seconds (2 weeks by default)"
|
||||
},
|
||||
"created": {
|
||||
"type": "Date"
|
||||
"type": "Date",
|
||||
"defaultFn": "now"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
|
|
Loading…
Reference in New Issue