mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Rename command files
This commit is contained in:
parent
c1bc8ee478
commit
f59545d97a
10 changed files with 9 additions and 9 deletions
|
@ -1,30 +0,0 @@
|
|||
import { CustomPage } from '@shared/models'
|
||||
import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
|
||||
import { AbstractCommand, OverrideCommandOptions } from '../shared'
|
||||
|
||||
export class CustomPagesCommand extends AbstractCommand {
|
||||
|
||||
getInstanceHomepage (options: OverrideCommandOptions = {}) {
|
||||
const path = '/api/v1/custom-pages/homepage/instance'
|
||||
|
||||
return this.getRequestBody<CustomPage>({
|
||||
...options,
|
||||
path,
|
||||
defaultExpectedStatus: HttpStatusCode.OK_200
|
||||
})
|
||||
}
|
||||
|
||||
updateInstanceHomepage (options: OverrideCommandOptions & {
|
||||
content: string
|
||||
}) {
|
||||
const { content } = options
|
||||
const path = '/api/v1/custom-pages/homepage/instance'
|
||||
|
||||
return this.putBodyRequest({
|
||||
...options,
|
||||
path,
|
||||
fields: { content },
|
||||
defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204
|
||||
})
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue