public function settings_put() { $this->auth(); try { if (!$this->put()) { throw new Exception('Empty Request', 400); } $this->user_settings_model->update_settings($this->user_id, $this->put()); $this->response($this->user_settings_model->get_user_settings($this->user_id), 200); } catch (Exception $e) { $this->response($e->getMessage(), $e->getCode()); } }