diff options
Diffstat (limited to 'shared/extra-utils/logs')
-rw-r--r-- | shared/extra-utils/logs/logs.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shared/extra-utils/logs/logs.ts b/shared/extra-utils/logs/logs.ts index c494c1f1e..8d741276c 100644 --- a/shared/extra-utils/logs/logs.ts +++ b/shared/extra-utils/logs/logs.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import { makeGetRequest } from '../requests/requests' | 1 | import { makeGetRequest } from '../requests/requests' |
2 | import { LogLevel } from '../../models/server/log-level.type' | 2 | import { LogLevel } from '../../models/server/log-level.type' |
3 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
3 | 4 | ||
4 | function getLogs (url: string, accessToken: string, startDate: Date, endDate?: Date, level?: LogLevel) { | 5 | function getLogs (url: string, accessToken: string, startDate: Date, endDate?: Date, level?: LogLevel) { |
5 | const path = '/api/v1/server/logs' | 6 | const path = '/api/v1/server/logs' |
@@ -9,7 +10,7 @@ function getLogs (url: string, accessToken: string, startDate: Date, endDate?: D | |||
9 | path, | 10 | path, |
10 | token: accessToken, | 11 | token: accessToken, |
11 | query: { startDate, endDate, level }, | 12 | query: { startDate, endDate, level }, |
12 | statusCodeExpected: 200 | 13 | statusCodeExpected: HttpStatusCode.OK_200 |
13 | }) | 14 | }) |
14 | } | 15 | } |
15 | 16 | ||
@@ -21,7 +22,7 @@ function getAuditLogs (url: string, accessToken: string, startDate: Date, endDat | |||
21 | path, | 22 | path, |
22 | token: accessToken, | 23 | token: accessToken, |
23 | query: { startDate, endDate }, | 24 | query: { startDate, endDate }, |
24 | statusCodeExpected: 200 | 25 | statusCodeExpected: HttpStatusCode.OK_200 |
25 | }) | 26 | }) |
26 | } | 27 | } |
27 | 28 | ||