🐛 Fix: removeById handler error

ISSUES CLOSED: #382
This commit is contained in:
Molunerfinn
2020-01-09 11:05:01 +08:00
parent 762dc9b2cc
commit c4f0a30c51
2 changed files with 15 additions and 10 deletions

View File

@@ -61,6 +61,14 @@ class DB {
unset (key: string, value: any): boolean {
return this.read().get(key).unset(value).value()
}
getById (key: string, id: string) {
// @ts-ignore
return this.read().get(key).getById(id).value()
}
removeById (key: string, id: string) {
// @ts-ignore
return this.read().get(key).removeById(id).write()
}
}
export default new DB()