added pools #14
@ -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})
|
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
|
|||||||
return models.PoolPost{}, utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.PoolIDIsEmpty})
|
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})
|
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})
|
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!
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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})
|
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})
|
return models.PoolReference{}, 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!
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ -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})
|
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})
|
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!
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user
Either you use
len(poolID) == 0
like inpool.go
or you use this method in pool.go. But not both!