Fix avatar removeall

This commit is contained in:
memetrollsXD 2022-08-02 16:45:00 +02:00
parent f502f32434
commit 0098da757c
No known key found for this signature in database
GPG Key ID: 105C2F3417AC32CD
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ export default async function handle(command: Command) {
} }
case "removeall": { case "removeall": {
for (const id in AvatarExcelTable) { for (const id in AvatarExcelTable) {
if (!(id == '1001')) { if (Number(id) !== 1001) {
await Avatar.remove(uid, parseInt(id)); await Avatar.remove(uid, parseInt(id));
} }
} }

View File

@ -62,7 +62,7 @@ export default class Avatar {
public static async remove(ownerUid: UID, baseAvatarId: number): Promise<void> { public static async remove(ownerUid: UID, baseAvatarId: number): Promise<void> {
const db = Database.getInstance(); const db = Database.getInstance();
await db.delete("avatars", { ownerUid, baseAvatarId }); await db.delete("avatars", { ownerUid, "data.baseAvatarId": baseAvatarId });
} }
} }