aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/plugins.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/controllers/api/plugins.ts b/server/controllers/api/plugins.ts
index bb410e891..de58a7350 100644
--- a/server/controllers/api/plugins.ts
+++ b/server/controllers/api/plugins.ts
@@ -25,6 +25,7 @@ import { ManagePlugin } from '../../../shared/models/plugins/manage-plugin.model
25import { logger } from '../../helpers/logger' 25import { logger } from '../../helpers/logger'
26import { listAvailablePluginsFromIndex } from '../../lib/plugins/plugin-index' 26import { listAvailablePluginsFromIndex } from '../../lib/plugins/plugin-index'
27import { PeertubePluginIndexList } from '../../../shared/models/plugins/peertube-plugin-index-list.model' 27import { PeertubePluginIndexList } from '../../../shared/models/plugins/peertube-plugin-index-list.model'
28import { RegisteredSettings } from '../../../shared/models/plugins/register-setting.model'
28 29
29const pluginRouter = express.Router() 30const pluginRouter = express.Router()
30 31
@@ -103,9 +104,11 @@ export {
103 104
104async function listPlugins (req: express.Request, res: express.Response) { 105async function listPlugins (req: express.Request, res: express.Response) {
105 const pluginType = req.query.pluginType 106 const pluginType = req.query.pluginType
107 const uninstalled = req.query.uninstalled
106 108
107 const resultList = await PluginModel.listForApi({ 109 const resultList = await PluginModel.listForApi({
108 pluginType, 110 pluginType,
111 uninstalled,
109 start: req.query.start, 112 start: req.query.start,
110 count: req.query.count, 113 count: req.query.count,
111 sort: req.query.sort 114 sort: req.query.sort
@@ -161,9 +164,9 @@ async function uninstallPlugin (req: express.Request, res: express.Response) {
161function getPluginRegisteredSettings (req: express.Request, res: express.Response) { 164function getPluginRegisteredSettings (req: express.Request, res: express.Response) {
162 const settings = PluginManager.Instance.getRegisteredSettings(req.params.npmName) 165 const settings = PluginManager.Instance.getRegisteredSettings(req.params.npmName)
163 166
164 return res.json({ 167 const json: RegisteredSettings = { settings }
165 settings 168
166 }) 169 return res.json(json)
167} 170}
168 171
169async function updatePluginSettings (req: express.Request, res: express.Response) { 172async function updatePluginSettings (req: express.Request, res: express.Response) {