mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
emit more specific status codes on video upload (#3423)
- reduce http status codes list to potentially useful codes - convert more codes to typed ones - factorize html generator for error responses
This commit is contained in:
parent
c977fd3ec9
commit
f2eb23cd87
53 changed files with 506 additions and 310 deletions
|
@ -2,7 +2,13 @@ import { makeDeleteRequest, makeGetRequest, makePostBodyRequest, makePutBodyRequ
|
|||
import { VideoRedundanciesTarget } from '@shared/models'
|
||||
import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
|
||||
|
||||
function updateRedundancy (url: string, accessToken: string, host: string, redundancyAllowed: boolean, expectedStatus = 204) {
|
||||
function updateRedundancy (
|
||||
url: string,
|
||||
accessToken: string,
|
||||
host: string,
|
||||
redundancyAllowed: boolean,
|
||||
expectedStatus = HttpStatusCode.NO_CONTENT_204
|
||||
) {
|
||||
const path = '/api/v1/server/redundancy/' + host
|
||||
|
||||
return makePutBodyRequest({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue