plugins/nostalgia@asphyxia/handler/webui.ts
2020-12-26 16:11:18 +09:00

20 lines
448 B
TypeScript

import { Profile } from "../models/profile";
export const fixIndexBug = async (data: {
refid: string;
confirm: string;
}) => {
if (data.confirm == "on") {
console.warn(`refid "${data.refid}" performs index reset!`)
await DB.Update<Profile>(
data.refid,
{ collection: 'profile' },
{ $set: {
music: 0,
sheet: 0,
brooch: 0
}
}
);
}
};