Add /admin page
This commit is contained in:
@@ -116,6 +116,15 @@ module.exports = class DB {
|
||||
}
|
||||
|
||||
|
||||
async updateLastDownload(sid, key) {
|
||||
debug(`Update last download ${sid}++${key}`);
|
||||
const data = this.get(sid).find(item => item.key === key);
|
||||
if(!data) return;
|
||||
data.metadata.lastDownload = Date.now();
|
||||
await this.store.update(`${sid}++${key}`, data);
|
||||
}
|
||||
|
||||
|
||||
get(sid) {
|
||||
return this.db[sid];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user