Skip to content

Commit 41a953a

Browse files
committed
vin length
1 parent 1d7ebe1 commit 41a953a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

internal/core/queries/decode_vin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func NewDecodeVINQueryHandler(dbs func() *db.ReaderWriter, vinDecodingService se
7272

7373
func (dc DecodeVINQueryHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error) {
7474
qry := query.(*DecodeVINQuery)
75-
if len(qry.VIN) < 12 || len(qry.VIN) > 17 {
75+
if len(qry.VIN) < 10 || len(qry.VIN) > 17 {
7676
return nil, &exceptions.ValidationError{Err: fmt.Errorf("invalid vin %s", qry.VIN)}
7777
}
7878
resp := &p_grpc.DecodeVinResponse{}

internal/core/queries/get_vin_profile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func NewGetVINProfileQueryHandler(dbs func() *db.ReaderWriter, logger *zerolog.L
4040

4141
func (dc GetVINProfileQueryHandler) Handle(ctx context.Context, query mediator.Message) (interface{}, error) {
4242
qry := query.(*GetVINProfileQuery)
43-
if len(qry.VIN) < 12 || len(qry.VIN) > 17 {
43+
if len(qry.VIN) < 10 || len(qry.VIN) > 17 {
4444
return nil, &exceptions.ValidationError{Err: fmt.Errorf("invalid vin %s", qry.VIN)}
4545
}
4646

0 commit comments

Comments
 (0)