]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/plugins.ts
Don't call plugin register/unregister methods
[github/Chocobozzz/PeerTube.git] / server / controllers / api / plugins.ts
index de9e055dc0fe4b9bf7db4b7c0a5484237a44ebc9..e85fd6e116207c8642ff8bcec92b50f244ff196d 100644 (file)
@@ -150,7 +150,7 @@ async function installPlugin (req: express.Request, res: express.Response) {
     : undefined
 
   try {
-    const plugin = await PluginManager.Instance.install(toInstall, pluginVersion, fromDisk)
+    const plugin = await PluginManager.Instance.install({ toInstall, version: pluginVersion, fromDisk })
 
     return res.json(plugin.toFormattedJSON())
   } catch (err) {
@@ -177,7 +177,7 @@ async function updatePlugin (req: express.Request, res: express.Response) {
 async function uninstallPlugin (req: express.Request, res: express.Response) {
   const body: ManagePlugin = req.body
 
-  await PluginManager.Instance.uninstall(body.npmName)
+  await PluginManager.Instance.uninstall({ npmName: body.npmName })
 
   return res.status(HttpStatusCode.NO_CONTENT_204).end()
 }