fix(housekeeping): keep rank reset transactional
This commit is contained in:
1 parent
3b568e30b4
commit
16ebc4a09e
2 files changed
+8
-7
No files matched your search
@@ -216,7 +216,6 @@ export async function prepareEmulatorRankCreation(
|
||||
);
|
||||
const id = Number(rows[0]?.next_id ?? 1);
|
||||
await ensurePermissionRankColumn(db, id);
|
||||
await resetPermissionRankColumn(db, id);
|
||||
return id;
|
||||
}
|
||||
|
||||
@@ -225,6 +224,7 @@ export async function createEmulatorRankInTransaction(
|
||||
id: number,
|
||||
data: { rank_name: string; level: number },
|
||||
): Promise<void> {
|
||||
await resetPermissionRankColumn(db, id);
|
||||
await rawExec(
|
||||
db,
|
||||
sql`
|
||||
|
||||
Reference in new issue
Block a user