We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 80b0bb8 + f72a296 commit 3ecb5e1Copy full SHA for 3ecb5e1
common/models/access-token.js
@@ -34,12 +34,6 @@ var DEFAULT_TOKEN_LEN = 64;
34
*/
35
36
module.exports = function(AccessToken) {
37
- // Workaround for https://github.com/strongloop/loopback/issues/292
38
- AccessToken.definition.rawProperties.created.default =
39
- AccessToken.definition.properties.created.default = function() {
40
- return new Date();
41
- };
42
-
43
/**
44
* Anonymous Token
45
*
common/models/access-token.json
@@ -12,7 +12,8 @@
12
"description": "time to live in seconds (2 weeks by default)"
13
},
14
"created": {
15
- "type": "Date"
+ "type": "Date",
16
+ "defaultFn": "now"
17
}
18
19
"relations": {
0 commit comments