Fix Error

This commit is contained in:
jbrass 2025-02-10 01:12:24 +01:00
parent 4278535265
commit 3ad11e7e11

View file

@ -25,8 +25,10 @@ namespace commands
if (!t) if (!t)
throw Error(301, "Eine solche Zuordnung existiert nicht."); throw Error(301, "Eine solche Zuordnung existiert nicht.");
if (!mgr->assignment_exists(user_id, task_id)) if (!mgr->assignment_exists(user_id, task_id))
throw Error(302, "Eine solche Zuordnung existiert bereits.");
throw Error(301, "Eine solche Zuordnung existiert nicht.");
Assignment as = {user_id, task_id}; Assignment as = {user_id, task_id};
//TODO:: DELETES THE WRONG THINGS
mgr->del_assignment(as); mgr->del_assignment(as);
mgr->save(); mgr->save();
} }