added pools #14

Merged
SoXX merged 16 commits from dev/pools into main 2024-10-15 09:03:46 +00:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 6b2d9e2cb5 - Show all commits

View File

@ -32,7 +32,7 @@ func CreatePoolPost(ctx context.Context, poolID models.PoolID, postID models.Pos
return models.PoolPost{}, utils.HandleError(ctx, span, localLogger, &otterError.Database{Reason: otterError.DatabaseIsNotConnected})
}
if poolID == "" {
if len(poolID) == 0 {
Alphyron marked this conversation as resolved Outdated

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!
return models.PoolPost{}, utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsEmpty})
}
@ -88,7 +88,7 @@ func DeletePoolPost(ctx context.Context, poolID models.PoolID, postID models.Pos
return utils.HandleError(ctx, span, localLogger, &otterError.Database{Reason: otterError.DatabaseIsNotConnected})
}
if poolID == "" {
if len(poolID) == 0 {
return utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsEmpty})
Alphyron marked this conversation as resolved
Review

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!
}

View File

@ -32,7 +32,7 @@ func CreatePoolReference(ctx context.Context, poolID models.PoolID, sourceID mod
return models.PoolReference{}, utils.HandleError(ctx, span, localLogger, &otterError.Database{Reason: otterError.DatabaseIsNotConnected})
}
if poolID == "" {
if len(poolID) == 0 {
return models.PoolReference{}, utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsEmpty})
Alphyron marked this conversation as resolved
Review

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!
}
@ -92,7 +92,7 @@ func DeletePoolReference(ctx context.Context, poolID models.PoolID, sourceID mod
return utils.HandleError(ctx, span, localLogger, &otterError.Database{Reason: otterError.DatabaseIsNotConnected})
}
if poolID == "" {
if len(poolID) == 0 {
return utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsEmpty})
Alphyron marked this conversation as resolved
Review

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!
}