diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-12-07 14:32:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 14:32:36 +0100 |
commit | 2d53be0267acc49cda46707b885096193a1f4e9c (patch) | |
tree | 887061a34bc67f40acbb96a6278f9544bf83caeb /shared/extra-utils/bulk/bulk.ts | |
parent | adc1f09c0dbd997f34028c1c82d1c118dc8ead80 (diff) | |
download | PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.tar.gz PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.tar.zst PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.zip |
replace numbers with typed http status codes (#3409)
Diffstat (limited to 'shared/extra-utils/bulk/bulk.ts')
-rw-r--r-- | shared/extra-utils/bulk/bulk.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shared/extra-utils/bulk/bulk.ts b/shared/extra-utils/bulk/bulk.ts index d6798ceb7..b6f437b8b 100644 --- a/shared/extra-utils/bulk/bulk.ts +++ b/shared/extra-utils/bulk/bulk.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import { BulkRemoveCommentsOfBody } from "@shared/models/bulk/bulk-remove-comments-of-body.model" | 1 | import { BulkRemoveCommentsOfBody } from "@shared/models/bulk/bulk-remove-comments-of-body.model" |
2 | import { makePostBodyRequest } from "../requests/requests" | 2 | import { makePostBodyRequest } from "../requests/requests" |
3 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
3 | 4 | ||
4 | function bulkRemoveCommentsOf (options: { | 5 | function bulkRemoveCommentsOf (options: { |
5 | url: string | 6 | url: string |
@@ -15,7 +16,7 @@ function bulkRemoveCommentsOf (options: { | |||
15 | path, | 16 | path, |
16 | token, | 17 | token, |
17 | fields: attributes, | 18 | fields: attributes, |
18 | statusCodeExpected: expectedStatus || 204 | 19 | statusCodeExpected: expectedStatus || HttpStatusCode.NO_CONTENT_204 |
19 | }) | 20 | }) |
20 | } | 21 | } |
21 | 22 | ||