add removing feature

This commit is contained in:
Thomas Ruoff
2018-02-02 23:57:14 +01:00
parent 558ae2e590
commit 5370571574
5 changed files with 72 additions and 24 deletions

View File

@@ -9,12 +9,14 @@ const sortBy = require('lodash.sortby');
const list = promisify(store.list);
const load = promisify(store.load);
const add = promisify(store.add);
const remove = promisify(store.remove);
module.exports = {
list: () => list()
.then(result => sortBy(result, 'created').reverse()),
load: id => load(id),
add: item => add(item),
remove: id => remove(id),
}