From 24d022df11b19aaee1e626c844b5fb286b63afa8 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Tue, 19 Sep 2023 10:21:20 +0200 Subject: [PATCH] fix(AdminController): Allow setting nice value fixes #982 Signed-off-by: Marcel Klehr --- lib/Controller/AdminController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Controller/AdminController.php b/lib/Controller/AdminController.php index 3c388bdf..c8ea6596 100644 --- a/lib/Controller/AdminController.php +++ b/lib/Controller/AdminController.php @@ -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);