aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/logs/logs.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/logs/logs.ts')
-rw-r--r--shared/extra-utils/logs/logs.ts5
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 @@
1import { makeGetRequest } from '../requests/requests' 1import { makeGetRequest } from '../requests/requests'
2import { LogLevel } from '../../models/server/log-level.type' 2import { LogLevel } from '../../models/server/log-level.type'
3import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
3 4
4function getLogs (url: string, accessToken: string, startDate: Date, endDate?: Date, level?: LogLevel) { 5function 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