From 371ae1b7324dc64d0096a0d67b0ec2f0f4c8c00a Mon Sep 17 00:00:00 2001 From: danielailie Date: Mon, 18 Sep 2023 16:06:05 +0300 Subject: [PATCH] Update regex for time on analytics --- src/modules/analytics/models/analytics-args.model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/analytics/models/analytics-args.model.ts b/src/modules/analytics/models/analytics-args.model.ts index 2afeda672..e0e6069a9 100644 --- a/src/modules/analytics/models/analytics-args.model.ts +++ b/src/modules/analytics/models/analytics-args.model.ts @@ -24,6 +24,6 @@ export class AnalyticsArgs { metric: string; @IsOptional() @Field({ nullable: true }) - @Matches(new RegExp('[1-60][s,m,h,d]')) + @Matches(new RegExp('^(?:[1-9]|[1-5][0-9]|60)[s,m,h,d]$')) time: string; }