Test Husky pre-commit hook.
This commit is contained in:
parent
ad5889dd4e
commit
917f18bf0c
|
@ -18,11 +18,8 @@ class Form extends CI_Controller
|
||||||
if (!$this->session->userdata('logged_in')) {
|
if (!$this->session->userdata('logged_in')) {
|
||||||
// If not logged in, redirect to login page
|
// If not logged in, redirect to login page
|
||||||
redirect('users/login');
|
redirect('users/login');
|
||||||
}
|
}$form_data = json_decode($this->input->raw_input_stream, true);
|
||||||
|
|
||||||
$form_data = json_decode($this->input->raw_input_stream, true);
|
|
||||||
$this->load->model('Form_model');
|
$this->load->model('Form_model');
|
||||||
|
|
||||||
if ($this->Form_model->save_form($form_data)) {
|
if ($this->Form_model->save_form($form_data)) {
|
||||||
$response = array('status' => 'success', 'message' => 'Form submitted successfully.');
|
$response = array('status' => 'success', 'message' => 'Form submitted successfully.');
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue