undo temp

This commit is contained in:
ThatOneCalculator 2022-12-05 23:05:47 -08:00
parent 1e164cc94d
commit b3a1d25e04

View file

@ -30,18 +30,14 @@ export const paramDef = {
// eslint-disable-next-line import/no-default-export
export default define(meta, paramDef, async (ps, user) => {
while (await UserLists.findOneBy({
const userList = await UserLists.findOneBy({
id: ps.listId,
userId: user.id,
}) != null) {
const userList = await UserLists.findOneBy({
// id: ps.listId,
userId: user.id,
});
});
if (userList == null) {
throw new ApiError(meta.errors.noSuchList);
}
await UserLists.delete(userList.id);
if (userList == null) {
throw new ApiError(meta.errors.noSuchList);
}
await UserLists.delete(userList.id);
});