back end update

This commit is contained in:
2021-04-26 08:21:51 +02:00
parent a59fcdca30
commit 5213c33f2a
10 changed files with 30 additions and 12 deletions
@@ -6,7 +6,7 @@ use Backend\Models\Registration;
if(isLogin()){
if(isset($_POST['updateReg'])){
if($reg = Registration::where("group_id", $_POST["groupId"])->where("game_jam_id", $_POST["gameJamId"])->first()){
if($reg = Registration::find($_POST["registrationId"])->where("group_id", groupViaToken($_SESSION['token'])->id)->first()){
$reg->group_amount = $_POST["groupAmount"];
if($reg->save()){
http_response_code(200);