objects IDs counter refactoring
This commit is contained in:
@@ -30,7 +30,7 @@ class GameObjectsManager{
|
||||
* @param {GameObject} data Asset data, данни за игровия обект
|
||||
*/
|
||||
this.create = async function(ctx, data){
|
||||
data.id = (await db.getLastId(collection)) + 1;
|
||||
data.id = await db.getId(collection);
|
||||
await db.create(collection, data);
|
||||
if (ctx.files?.file){
|
||||
await this.addFile(data, ctx.files.file)
|
||||
|
||||
Reference in New Issue
Block a user