mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-03-22 18:04:43 -05:00
20 lines
448 B
TypeScript
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
|
|
}
|
|
}
|
|
);
|
|
}
|
|
}; |