From 2d53be0267acc49cda46707b885096193a1f4e9c Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Mon, 7 Dec 2020 14:32:36 +0100 Subject: replace numbers with typed http status codes (#3409) --- shared/extra-utils/overviews/overviews.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'shared/extra-utils/overviews') diff --git a/shared/extra-utils/overviews/overviews.ts b/shared/extra-utils/overviews/overviews.ts index ae4d31aa3..5e1a13e5e 100644 --- a/shared/extra-utils/overviews/overviews.ts +++ b/shared/extra-utils/overviews/overviews.ts @@ -1,6 +1,7 @@ import { makeGetRequest } from '../requests/requests' +import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' -function getVideosOverview (url: string, page: number, statusCodeExpected = 200) { +function getVideosOverview (url: string, page: number, statusCodeExpected = HttpStatusCode.OK_200) { const path = '/api/v1/overviews/videos' const query = { page } @@ -13,7 +14,7 @@ function getVideosOverview (url: string, page: number, statusCodeExpected = 200) }) } -function getVideosOverviewWithToken (url: string, page: number, token: string, statusCodeExpected = 200) { +function getVideosOverviewWithToken (url: string, page: number, token: string, statusCodeExpected = HttpStatusCode.OK_200) { const path = '/api/v1/overviews/videos' const query = { page } -- cgit v1.2.3