added pools #14
@ -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) != 25 {
|
||||
if len(poolID) == 0 {
|
||||
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})
|
||||
Alphyron marked this conversation as resolved
|
||||
}
|
||||
|
||||
if len(poolID) != 25 {
|
||||
if len(poolID) == 0 {
|
||||
return utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsWrongLength})
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ func DeletePoolReference(ctx context.Context, poolID models.PoolID, sourceID mod
|
||||
return utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsEmpty})
|
||||
Alphyron marked this conversation as resolved
Alphyron
commented
Either you use len(poolID) == 0 like in pool.go or you use this method in pool.go. But not both! Either you use len(poolID) == 0 like in pool.go or you use this method in pool.go. But not both!
|
||||
}
|
||||
|
||||
if len(poolID) != 25 {
|
||||
if len(poolID) == 0 {
|
||||
return utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PostIDIsWrongLength})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user
Either you use len(poolID) == 0 like in pool.go or you use this method in pool.go. But not both!