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.
1 parent 7feed56 commit 99f47a9Copy full SHA for 99f47a9
lib/identif.js
@@ -50,6 +50,7 @@ class Identif {
50
*
51
* @param {object} extra - The extra data to store.
52
* @param {object} [options={}] - The options of request operation.
53
+ * @param {number} [options.ttl] - The remaining time to live in the store.
54
* @return {Object} The request information.
55
*/
56
async request(extra, options = {}) {
@@ -60,8 +61,8 @@ class Identif {
60
61
const ttl = options.ttl || this.store.options.ttl;
62
const data = {
63
id: this.requestIdGenerator(),
- code: this.codeGenerator,
64
- expireAt: new Date(now.getTime() + (1000 * ttl)),
+ code: this.codeGenerator(),
65
+ ttl: ttl,
66
createdAt: now
67
};
68
// state, action, channel
0 commit comments