From ef483758197a052f851b2dfe9a977f4cffcbc4db Mon Sep 17 00:00:00 2001 From: int2001 Date: Sun, 28 Apr 2024 14:39:31 +0000 Subject: [PATCH] Return new session-content directly after save --- application/controllers/Contesting.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/application/controllers/Contesting.php b/application/controllers/Contesting.php index 46279fed5..4aef00865 100644 --- a/application/controllers/Contesting.php +++ b/application/controllers/Contesting.php @@ -70,12 +70,11 @@ class Contesting extends CI_Controller { } public function setSession() { - $this->load->model('Contesting_model'); + $this->load->model('Contesting_model'); - $this->Contesting_model->setSession(); - - return json_encode("ok"); - } + header('Content-Type: application/json'); + echo json_encode($this->Contesting_model->getSession()); + } public function create() { $this->load->model('Contesting_model');