#12 audit and history
This commit is contained in:
@@ -34,6 +34,7 @@ class AccessManager {
|
||||
async addToHistory(id, collection, action){
|
||||
let o;
|
||||
if (typeof id == 'string') o = await this.app.db.get(collection, {'_id': this.app.db.ObjectId(id)});
|
||||
else if (typeof id == 'number') o = await this.app.db.get(collection, {id});
|
||||
else o = id;
|
||||
o._oid = this.app.db.ObjectId(o._id);
|
||||
o._from = collection;
|
||||
|
||||
Reference in New Issue
Block a user