mirror of
https://gitlab.com/mobicoop/v3/service/matcher.git
synced 2026-01-09 00:32:39 +00:00
fix bad validation for distance and duration ratio, and for proportion
This commit is contained in:
@@ -2,10 +2,10 @@ import {
|
||||
ArrayMinSize,
|
||||
IsArray,
|
||||
IsBoolean,
|
||||
IsDecimal,
|
||||
IsEnum,
|
||||
IsISO8601,
|
||||
IsInt,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsUUID,
|
||||
Max,
|
||||
@@ -93,7 +93,7 @@ export class MatchRequestDto {
|
||||
useProportion?: boolean;
|
||||
|
||||
@IsOptional()
|
||||
@IsDecimal()
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
@Max(1)
|
||||
proportion?: number;
|
||||
@@ -109,13 +109,13 @@ export class MatchRequestDto {
|
||||
azimuthMargin?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsDecimal()
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
@Max(1)
|
||||
maxDetourDistanceRatio?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsDecimal()
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
@Max(1)
|
||||
maxDetourDurationRatio?: number;
|
||||
|
||||
@@ -19,7 +19,7 @@ message MatchRequest {
|
||||
AlgorithmType algorithmType = 10;
|
||||
int32 remoteness = 11;
|
||||
bool useProportion = 12;
|
||||
int32 proportion = 13;
|
||||
float proportion = 13;
|
||||
bool useAzimuth = 14;
|
||||
int32 azimuthMargin = 15;
|
||||
float maxDetourDistanceRatio = 16;
|
||||
|
||||
Reference in New Issue
Block a user