fix: also check if its under 25
This commit is contained in:
parent
6a11dc57a4
commit
d753d32025
@ -36,7 +36,7 @@ func CreatePoolPost(ctx context.Context, poolID models.PoolID, postID models.Pos
|
|||||||
return models.PoolPost{}, utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsEmpty})
|
return models.PoolPost{}, utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsEmpty})
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(poolID) != 0 {
|
if len(poolID) != 25 {
|
||||||
return models.PoolPost{}, utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsWrongLength})
|
return models.PoolPost{}, utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsWrongLength})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ func DeletePoolPost(ctx context.Context, poolID models.PoolID, postID models.Pos
|
|||||||
return utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsEmpty})
|
return utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsEmpty})
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(poolID) != 0 {
|
if len(poolID) != 25 {
|
||||||
return utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsWrongLength})
|
return utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsWrongLength})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user