objects IDs counter refactoring
This commit is contained in:
@@ -19,7 +19,7 @@ class GamesManager{
|
||||
* @param {Game} data the game description, дефиниция на играта
|
||||
*/
|
||||
this.create = async function(ctx, data){
|
||||
data.id = (await db.getLastId(collection)) + 1;
|
||||
data.id = await db.getId(collection);
|
||||
await db.create(collection, data);
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user