Skip to content

Commit

Permalink
fix(AdminController): Allow setting nice value
Browse files Browse the repository at this point in the history
fixes #982

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Sep 19, 2023
1 parent 7ec080b commit 24d022d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Controller/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,9 @@ public function cron(): JSONResponse {
return new JSONResponse(['cron' => $cron]);
}

public function setSetting(string $setting, string $value): JSONResponse {
public function setSetting(string $setting, $value): JSONResponse {
try {
$this->settingsService->setSetting($setting, $value);
$this->settingsService->setSetting($setting, (string) $value);
return new JSONResponse([], Http::STATUS_OK);
} catch (\OCA\Recognize\Exception\Exception $e) {
return new JSONResponse([], Http::STATUS_BAD_REQUEST);
Expand Down

0 comments on commit 24d022d

Please sign in to comment.