| @@ -20,18 +20,13 @@ | ||
| 20 | 20 | |
| 21 | 21 | public function updateConfig(Request $request, Response $response, Config $config) |
| 22 | 22 | { |
| 23 | 23 | |
| 24 | - $key = $request->input('key'); | |
| 25 | - $value = $request->input('value'); | |
| 24 | + if(!$config->updateConfig($request->input('config'))) { | |
| 26 | 25 | |
| 27 | - $config = $config->update($key, $value); | |
| 28 | - | |
| 29 | - if($config === false) { | |
| 30 | - | |
| 31 | 26 | return $response->json('Cannot save settings!', 422); |
| 32 | 27 | } |
| 33 | 28 | |
| 34 | - return $response->json($config); | |
| 29 | + return $response->json('Done'); | |
| 35 | 30 | } |
| 36 | 31 | |
| 37 | 32 | } |