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

CLI: plugins install command accept a --plugin-version parameter. (#4599)

* CLI: plugins install command accept a --plugin-version parameter.

* Unit tests for plugins install --plugin-version.

* Fix linting.

* Styling

Co-authored-by: Chocobozzz <me@florianbigard.com>
This commit is contained in:
John Livingston 2021-12-03 10:14:01 +01:00 committed by GitHub
parent 37cb07eae2
commit 3a1157a68a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 37 additions and 4 deletions

View file

@ -158,15 +158,16 @@ export class PluginsCommand extends AbstractCommand {
install (options: OverrideCommandOptions & {
path?: string
npmName?: string
pluginVersion?: string
}) {
const { npmName, path } = options
const { npmName, path, pluginVersion } = options
const apiPath = '/api/v1/plugins/install'
return this.postBodyRequest({
...options,
path: apiPath,
fields: { npmName, path },
fields: { npmName, path, pluginVersion },
implicitToken: true,
defaultExpectedStatus: HttpStatusCode.OK_200
})