diff options
Diffstat (limited to 'apps/provisioning_api/lib/Controller/PreferencesController.php')
-rw-r--r-- | apps/provisioning_api/lib/Controller/PreferencesController.php | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/apps/provisioning_api/lib/Controller/PreferencesController.php b/apps/provisioning_api/lib/Controller/PreferencesController.php index 2dba8b86eb6..cc7a9efd764 100644 --- a/apps/provisioning_api/lib/Controller/PreferencesController.php +++ b/apps/provisioning_api/lib/Controller/PreferencesController.php @@ -6,6 +6,7 @@ declare(strict_types=1); * @copyright Copyright (c) 2022 Joas Schilling <coding@schilljs.com> * * @author Joas Schilling <coding@schilljs.com> + * @author Kate Döen <kate.doeen@nextcloud.com> * * @license GNU AGPL version 3 or any later version * @@ -58,6 +59,16 @@ class PreferencesController extends OCSController { /** * @NoAdminRequired * @NoSubAdminRequired + * + * Update multiple preference values of an app + * + * @param string $appId ID of the app + * @param array<string, string> $configs Key-value pairs of the preferences + * + * @return DataResponse<Http::STATUS_OK|Http::STATUS_BAD_REQUEST, array<empty>, array{}> + * + * 200: Preferences updated successfully + * 400: Preference invalid */ public function setMultiplePreferences(string $appId, array $configs): DataResponse { $userId = $this->userSession->getUser()->getUID(); @@ -93,6 +104,16 @@ class PreferencesController extends OCSController { /** * @NoAdminRequired * @NoSubAdminRequired + * + * Update a preference value of an app + * + * @param string $appId ID of the app + * @param string $configKey Key of the preference + * @param string $configValue New value + * @return DataResponse<Http::STATUS_OK|Http::STATUS_BAD_REQUEST, array<empty>, array{}> + * + * 200: Preference updated successfully + * 400: Preference invalid */ public function setPreference(string $appId, string $configKey, string $configValue): DataResponse { $userId = $this->userSession->getUser()->getUID(); @@ -124,6 +145,15 @@ class PreferencesController extends OCSController { /** * @NoAdminRequired * @NoSubAdminRequired + * + * Delete multiple preferences for an app + * + * @param string $appId ID of the app + * @param string[] $configKeys Keys to delete + * + * @return DataResponse<Http::STATUS_OK|Http::STATUS_BAD_REQUEST, array<empty>, array{}> + * 200: Preferences deleted successfully + * 400: Preference invalid */ public function deleteMultiplePreference(string $appId, array $configKeys): DataResponse { $userId = $this->userSession->getUser()->getUID(); @@ -157,6 +187,15 @@ class PreferencesController extends OCSController { /** * @NoAdminRequired * @NoSubAdminRequired + * + * Delete a preference for an app + * + * @param string $appId ID of the app + * @param string $configKey Key to delete + * @return DataResponse<Http::STATUS_OK|Http::STATUS_BAD_REQUEST, array<empty>, array{}> + * + * 200: Preference deleted successfully + * 400: Preference invalid */ public function deletePreference(string $appId, string $configKey): DataResponse { $userId = $this->userSession->getUser()->getUID(); |