]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/logs/logs-command.ts
Add ability to filter logs by tags
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / logs / logs-command.ts
index 5912e814f3fd4c91e683002b35352ac456b7b3a0..7b5c66c0ccb6fb989a1688a5900f769808d60ad8 100644 (file)
@@ -8,15 +8,16 @@ export class LogsCommand extends AbstractCommand {
     startDate: Date
     endDate?: Date
     level?: LogLevel
+    tagsOneOf?: string[]
   }) {
-    const { startDate, endDate, level } = options
+    const { startDate, endDate, tagsOneOf, level } = options
     const path = '/api/v1/server/logs'
 
-    return this.getRequestBody({
+    return this.getRequestBody<any[]>({
       ...options,
 
       path,
-      query: { startDate, endDate, level },
+      query: { startDate, endDate, level, tagsOneOf },
       implicitToken: true,
       defaultExpectedStatus: HttpStatusCode.OK_200
     })