1
0
Fork 0
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:
Chocobozzz 2024-03-26 14:05:19 +01:00
parent 058ef6912c
commit a159b8b517
No known key found for this signature in database
GPG key ID: 583A612D890159BE
21 changed files with 295 additions and 45 deletions

View file

@ -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 })
})
}