forked from University/epr24pr5-ojanssen2
Show/Unassign Fix
This commit is contained in:
parent
a8d390ffe3
commit
4278535265
2 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ namespace commands {
|
||||||
else if (data_type == "task") {
|
else if (data_type == "task") {
|
||||||
Task *task = mgr->get_task(show_id);
|
Task *task = mgr->get_task(show_id);
|
||||||
if (task == nullptr) {
|
if (task == nullptr) {
|
||||||
throw Error(401, "Eine solche BenutzerIn existiert nicht.");
|
throw Error(402, "Eine solche Aufgabe existiert nicht.");
|
||||||
}
|
}
|
||||||
AddTask unid_task = {*task};
|
AddTask unid_task = {*task};
|
||||||
cout << unid_task;
|
cout << unid_task;
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace commands
|
||||||
throw Error(401, "Eine solche BenutzerIn existiert nicht.");
|
throw Error(401, "Eine solche BenutzerIn existiert nicht.");
|
||||||
const Task* t = mgr->get_task(task_id);
|
const Task* t = mgr->get_task(task_id);
|
||||||
if (!t)
|
if (!t)
|
||||||
throw Error(401, "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(302, "Eine solche Zuordnung existiert bereits.");
|
||||||
Assignment as = {user_id, task_id};
|
Assignment as = {user_id, task_id};
|
||||||
|
|
Loading…
Add table
Reference in a new issue