fix: also check if its under 25
All checks were successful
Gitea Build Check / Build (pull_request) Successful in 3m10s
Gitea Build Check / Build (push) Successful in 3m6s

This commit is contained in:
SoXX 2024-10-15 10:59:04 +02:00
parent 6a11dc57a4
commit d753d32025

View File

@ -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})
}
if len(poolID) != 0 {
if len(poolID) != 25 {
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})
}
if len(poolID) != 0 {
if len(poolID) != 25 {
return utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsWrongLength})
}