fix: consistent id check

- use consistent methode to check if the id is 0
This commit is contained in:
SoXX 2024-10-15 10:45:55 +02:00
parent 91254adfe3
commit 37487c4f52

View File

@ -40,7 +40,7 @@ func CreatePoolReference(ctx context.Context, poolID models.PoolID, sourceID mod
return models.PoolReference{}, utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsWrongLength})
}
if sourceID == "" {
if len(sourceID) == 0 {
return models.PoolReference{}, utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.SourceIDIsEmpty})
}
@ -100,7 +100,7 @@ func DeletePoolReference(ctx context.Context, poolID models.PoolID, sourceID mod
return utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PostIDIsWrongLength})
}
if sourceID == "" {
if len(sourceID) == 0 {
return utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.SourceIDIsEmpty})
}