Added routes

This commit is contained in:
neerholt
2021-03-17 09:43:09 +01:00
parent 0d4f161a48
commit a84c7a9258
14 changed files with 148 additions and 54 deletions
+12 -4
View File
@@ -25,15 +25,23 @@ if (isLogin()) {
//Try to save it
if(!$keyword->save()){
header("location: ../../../Frontend/index.php?created=failed");
header("location: ../../../Frontend/index.html?error=FailedToSave");
exit();
}else{
header("location:../../../Frontend/index.php?created=success");
header("location: ../../../Frontend/index.html?success=KeyWordSaved");
exit();
}
}else{
header("location: ../../../Frontend/index.html?error=YouCantSubmitAnyMoreKeyWords");
exit();
}
//TODO make toast feedback
}else{
header("location: ../../../Frontend/index.html?error=CouldNotSubmitKeyWord");
exit();
}
}else{
header("location: ../Frontend/index.php?login=notLoggein");
header("location: ../../../Frontend/index.html?error=NotLogin");
exit();
}