undo temp
This commit is contained in:
parent
dda9fb2945
commit
6de6e5a393
1 changed files with 7 additions and 11 deletions
|
@ -30,18 +30,14 @@ export const paramDef = {
|
||||||
|
|
||||||
// eslint-disable-next-line import/no-default-export
|
// eslint-disable-next-line import/no-default-export
|
||||||
export default define(meta, paramDef, async (ps, user) => {
|
export default define(meta, paramDef, async (ps, user) => {
|
||||||
while (await UserLists.findOneBy({
|
const userList = await UserLists.findOneBy({
|
||||||
|
id: ps.listId,
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
}) != null) {
|
});
|
||||||
const userList = await UserLists.findOneBy({
|
|
||||||
// id: ps.listId,
|
|
||||||
userId: user.id,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (userList == null) {
|
if (userList == null) {
|
||||||
throw new ApiError(meta.errors.noSuchList);
|
throw new ApiError(meta.errors.noSuchList);
|
||||||
}
|
|
||||||
|
|
||||||
await UserLists.delete(userList.id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await UserLists.delete(userList.id);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue