summaryrefslogtreecommitdiffstats
path: root/apps/files/lib/Controller
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2022-12-28 15:29:54 +0100
committerJohn Molakvoæ <skjnldsv@protonmail.com>2023-01-04 16:46:14 +0100
commit5b9a8f0407a9e3fe7e00f0fc9284ea986905f1b5 (patch)
tree1363678dab6ed5e1554a7a74bc8a6a1a55bdf785 /apps/files/lib/Controller
parent8f1bf13ae3046400ce6248fb13e5515e8e9ed5c4 (diff)
downloadnextcloud-server-5b9a8f0407a9e3fe7e00f0fc9284ea986905f1b5.tar.gz
nextcloud-server-5b9a8f0407a9e3fe7e00f0fc9284ea986905f1b5.zip
Add component testing
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/lib/Controller')
-rw-r--r--apps/files/lib/Controller/ApiController.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/lib/Controller/ApiController.php b/apps/files/lib/Controller/ApiController.php
index e9d15018d03..76597b7a018 100644
--- a/apps/files/lib/Controller/ApiController.php
+++ b/apps/files/lib/Controller/ApiController.php
@@ -285,13 +285,13 @@ class ApiController extends Controller {
*
* @NoAdminRequired
*
- * @param bool $key
+ * @param string $key
* @param string|bool $value
* @return JSONResponse
*/
public function setConfig(string $key, string|bool $value): JSONResponse {
try {
- $this->userConfig->setConfig($key, $value);
+ $this->userConfig->setConfig($key, (string)$value);
} catch (\InvalidArgumentException $e) {
return new JSONResponse(['message' => $e->getMessage()], Http::STATUS_BAD_REQUEST);
}