diff options
Diffstat (limited to 'server/controllers/api/plugins.ts')
-rw-r--r-- | server/controllers/api/plugins.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/controllers/api/plugins.ts b/server/controllers/api/plugins.ts index b64062287..1e6a02c49 100644 --- a/server/controllers/api/plugins.ts +++ b/server/controllers/api/plugins.ts | |||
@@ -8,6 +8,7 @@ import { | |||
8 | authenticate, | 8 | authenticate, |
9 | availablePluginsSortValidator, | 9 | availablePluginsSortValidator, |
10 | ensureUserHasRight, | 10 | ensureUserHasRight, |
11 | openapiOperationDoc, | ||
11 | paginationValidator, | 12 | paginationValidator, |
12 | pluginsSortValidator, | 13 | pluginsSortValidator, |
13 | setDefaultPagination, | 14 | setDefaultPagination, |
@@ -35,6 +36,7 @@ import { | |||
35 | const pluginRouter = express.Router() | 36 | const pluginRouter = express.Router() |
36 | 37 | ||
37 | pluginRouter.get('/available', | 38 | pluginRouter.get('/available', |
39 | openapiOperationDoc({ operationId: 'getAvailablePlugins' }), | ||
38 | authenticate, | 40 | authenticate, |
39 | ensureUserHasRight(UserRight.MANAGE_PLUGINS), | 41 | ensureUserHasRight(UserRight.MANAGE_PLUGINS), |
40 | listAvailablePluginsValidator, | 42 | listAvailablePluginsValidator, |
@@ -46,6 +48,7 @@ pluginRouter.get('/available', | |||
46 | ) | 48 | ) |
47 | 49 | ||
48 | pluginRouter.get('/', | 50 | pluginRouter.get('/', |
51 | openapiOperationDoc({ operationId: 'getPlugins' }), | ||
49 | authenticate, | 52 | authenticate, |
50 | ensureUserHasRight(UserRight.MANAGE_PLUGINS), | 53 | ensureUserHasRight(UserRight.MANAGE_PLUGINS), |
51 | listPluginsValidator, | 54 | listPluginsValidator, |
@@ -84,6 +87,7 @@ pluginRouter.get('/:npmName', | |||
84 | ) | 87 | ) |
85 | 88 | ||
86 | pluginRouter.post('/install', | 89 | pluginRouter.post('/install', |
90 | openapiOperationDoc({ operationId: 'addPlugin' }), | ||
87 | authenticate, | 91 | authenticate, |
88 | ensureUserHasRight(UserRight.MANAGE_PLUGINS), | 92 | ensureUserHasRight(UserRight.MANAGE_PLUGINS), |
89 | installOrUpdatePluginValidator, | 93 | installOrUpdatePluginValidator, |
@@ -91,6 +95,7 @@ pluginRouter.post('/install', | |||
91 | ) | 95 | ) |
92 | 96 | ||
93 | pluginRouter.post('/update', | 97 | pluginRouter.post('/update', |
98 | openapiOperationDoc({ operationId: 'updatePlugin' }), | ||
94 | authenticate, | 99 | authenticate, |
95 | ensureUserHasRight(UserRight.MANAGE_PLUGINS), | 100 | ensureUserHasRight(UserRight.MANAGE_PLUGINS), |
96 | installOrUpdatePluginValidator, | 101 | installOrUpdatePluginValidator, |
@@ -98,6 +103,7 @@ pluginRouter.post('/update', | |||
98 | ) | 103 | ) |
99 | 104 | ||
100 | pluginRouter.post('/uninstall', | 105 | pluginRouter.post('/uninstall', |
106 | openapiOperationDoc({ operationId: 'uninstallPlugin' }), | ||
101 | authenticate, | 107 | authenticate, |
102 | ensureUserHasRight(UserRight.MANAGE_PLUGINS), | 108 | ensureUserHasRight(UserRight.MANAGE_PLUGINS), |
103 | uninstallPluginValidator, | 109 | uninstallPluginValidator, |