mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 09:49:20 +02:00
Add ability to list and delete original file
In admin
This commit is contained in:
parent
058ef6912c
commit
a159b8b517
21 changed files with 295 additions and 45 deletions
|
@ -183,6 +183,20 @@ export class VideosCommand extends AbstractCommand {
|
|||
})
|
||||
}
|
||||
|
||||
deleteSource (options: OverrideCommandOptions & {
|
||||
id: number | string
|
||||
}) {
|
||||
const path = '/api/v1/videos/' + options.id + '/source/file'
|
||||
|
||||
return this.deleteRequest({
|
||||
...options,
|
||||
|
||||
path,
|
||||
implicitToken: true,
|
||||
defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
|
||||
})
|
||||
}
|
||||
|
||||
async getId (options: OverrideCommandOptions & {
|
||||
uuid: number | string
|
||||
}) {
|
||||
|
@ -273,12 +287,12 @@ export class VideosCommand extends AbstractCommand {
|
|||
const privacyOneOf = getAllPrivacies()
|
||||
|
||||
return this.list({
|
||||
...options,
|
||||
|
||||
include,
|
||||
nsfw,
|
||||
privacyOneOf,
|
||||
|
||||
...options,
|
||||
|
||||
token: this.buildCommonRequestToken({ ...options, implicitToken: true })
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue