File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 99
1010use OCA \LogReader \Constants ;
1111use OCA \LogReader \Service \SettingsService ;
12+ use OCA \LogReader \Settings \Admin ;
1213use OCP \AppFramework \ApiController ;
1314use OCP \AppFramework \Http ;
15+ use OCP \AppFramework \Http \Attribute \AuthorizedAdminSetting ;
1416use OCP \AppFramework \Http \JSONResponse ;
1517use OCP \IConfig ;
1618use OCP \IRequest ;
@@ -31,9 +33,8 @@ public function __construct(
3133
3234 /**
3335 * Get the current app config
34- *
35- * @AuthorizedAdminSetting(settings=OCA\LogReader\Settings\Admin)
3636 */
37+ #[AuthorizedAdminSetting(settings: Admin::class)]
3738 public function getAppConfig (): JSONResponse {
3839 return new JSONResponse ($ this ->settingsService ->getAppSettings ());
3940 }
@@ -44,8 +45,8 @@ public function getAppConfig(): JSONResponse {
4445 * @param string $settingsKey AppConfig Key to store
4546 * @param mixed $settingsValues Corresponding AppConfig Value
4647 *
47- * @AuthorizedAdminSetting(settings=OCA\LogReader\Settings\Admin)
4848 */
49+ #[AuthorizedAdminSetting(settings: Admin::class)]
4950 public function updateAppConfig (string $ settingsKey , $ settingsValue ): JSONResponse {
5051 $ this ->logger ->debug ('Updating AppConfig: {settingsKey} => {settingsValue} ' , [
5152 'settingsKey ' => $ settingsKey ,
You can’t perform that action at this time.
0 commit comments