1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Don't call plugin register/unregister methods

This commit is contained in:
Chocobozzz 2023-05-05 14:14:26 +02:00
parent 257fa0d1a0
commit 841ddf8886
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 34 additions and 13 deletions

View 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()
}