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:
parent
37cb07eae2
commit
3a1157a68a
6 changed files with 37 additions and 4 deletions
|
@ -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
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue