Skip to content

Commit ab2ea15

Browse files
committed
use date based id
1 parent af8928b commit ab2ea15

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

remotestorage/remotestorage-module.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,11 @@ const todos = {
1818
handle: privateClient.on,
1919

2020
async addTask (description) {
21-
const id = Date.now().toString(36).toLowerCase();
22-
2321
const item = {
2422
description,
2523
};
2624

27-
await privateClient.storeObject('todo', id, item);
25+
await privateClient.storeObject('todo', new Date().toJSON().replace(/\D/g, ''), item);
2826

2927
return item;
3028
},

0 commit comments

Comments
 (0)