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