From 6a11dc57a433f2f6ca16d361e12b800f6cd6bcd5 Mon Sep 17 00:00:00 2001 From: SoXX Date: Tue, 15 Oct 2024 10:57:33 +0200 Subject: [PATCH] fix: negation --- pkg/database/pool_post.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/database/pool_post.go b/pkg/database/pool_post.go index aeba635..8873e24 100644 --- a/pkg/database/pool_post.go +++ b/pkg/database/pool_post.go @@ -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) != 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}) } - if len(poolID) == 0 { + if len(poolID) != 0 { return utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsWrongLength}) }