Fix team deletion
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled

This commit is contained in:
Mia
2025-07-23 23:37:30 -05:00
parent 2fbe8c6ca3
commit ffef771596

View File

@@ -945,12 +945,8 @@ export const actions: { [k: string]: QueryHandler } = {
if (team.ownerid !== this.user.id) {
throw new ActionError(`You cannot delete that team, as it is not yours.`);
}
try {
await tables.teams.delete(teamid);
return {success: true};
} catch {
return {success: false};
}
await tables.teams.deleteAll()`WHERE teamid = ${teamid}`;
return {success: true};
},
async copyteam(params) {
let { teamid, password } = params;