aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/logs
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/logs')
-rw-r--r--shared/extra-utils/logs/index.ts1
-rw-r--r--shared/extra-utils/logs/logs-command.ts44
2 files changed, 0 insertions, 45 deletions
diff --git a/shared/extra-utils/logs/index.ts b/shared/extra-utils/logs/index.ts
deleted file mode 100644
index 69452d7f0..000000000
--- a/shared/extra-utils/logs/index.ts
+++ /dev/null
@@ -1 +0,0 @@
1export * from './logs-command'
diff --git a/shared/extra-utils/logs/logs-command.ts b/shared/extra-utils/logs/logs-command.ts
deleted file mode 100644
index 7b5c66c0c..000000000
--- a/shared/extra-utils/logs/logs-command.ts
+++ /dev/null
@@ -1,44 +0,0 @@
1import { HttpStatusCode } from '@shared/models'
2import { LogLevel } from '../../models/server/log-level.type'
3import { AbstractCommand, OverrideCommandOptions } from '../shared'
4
5export class LogsCommand extends AbstractCommand {
6
7 getLogs (options: OverrideCommandOptions & {
8 startDate: Date
9 endDate?: Date
10 level?: LogLevel
11 tagsOneOf?: string[]
12 }) {
13 const { startDate, endDate, tagsOneOf, level } = options
14 const path = '/api/v1/server/logs'
15
16 return this.getRequestBody<any[]>({
17 ...options,
18
19 path,
20 query: { startDate, endDate, level, tagsOneOf },
21 implicitToken: true,
22 defaultExpectedStatus: HttpStatusCode.OK_200
23 })
24 }
25
26 getAuditLogs (options: OverrideCommandOptions & {
27 startDate: Date
28 endDate?: Date
29 }) {
30 const { startDate, endDate } = options
31
32 const path = '/api/v1/server/audit-logs'
33
34 return this.getRequestBody({
35 ...options,
36
37 path,
38 query: { startDate, endDate },
39 implicitToken: true,
40 defaultExpectedStatus: HttpStatusCode.OK_200
41 })
42 }
43
44}