added pools #14

Merged
SoXX merged 16 commits from dev/pools into main 2024-10-15 09:03:46 +00:00
Showing only changes of commit 37487c4f52 - Show all commits

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})
Alphyron marked this conversation as resolved Outdated

its not really to short, is just had a wrong length....

its not really to short, is just had a wrong length....
}
if sourceID == "" {
if len(sourceID) == 0 {
return models.PoolReference{}, utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.SourceIDIsEmpty})
Alphyron marked this conversation as resolved
Review

Either you use len(sourceID) == 0 like in pool.go or you use this method in pool.go. But not both!

Either you use len(sourceID) == 0 like in pool.go or you use this method in pool.go. But not both!
}
@ -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})

its not really to short, is just had a wrong length....

its not really to short, is just had a wrong length....

Please recheck this, you want to check if the length nis not 25!

Please recheck this, you want to check if the length nis not 25!
}
if sourceID == "" {
if len(sourceID) == 0 {
return utils.HandleError(ctx, span, localLogger, &otterError.EntityValidationFailed{Reason: otterError.SourceIDIsEmpty})
Alphyron marked this conversation as resolved
Review

Either you use len(sourceID) == 0 like in pool.go or you use this method in pool.go. But not both!

Either you use len(sourceID) == 0 like in pool.go or you use this method in pool.go. But not both!
}