BREAKING CHANGE: V2 of thr SDK #12
@ -2,7 +2,6 @@ package postgres
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"git.dragse.it/anthrove/otter-space-sdk/pkg/models"
|
||||
"git.dragse.it/anthrove/otter-space-sdk/pkg/models/pgModels"
|
||||
log "github.com/sirupsen/logrus"
|
||||
@ -65,10 +64,6 @@ func CheckUserToPostLink(ctx context.Context, db *gorm.DB, anthroveUserID models
|
||||
|
||||
exists := count > 0
|
||||
|
||||
if !exists {
|
||||
return false, fmt.Errorf("no post link exists")
|
||||
}
|
||||
|
||||
log.WithFields(log.Fields{
|
||||
"relationship_exists": exists,
|
||||
"relationship_anthrove_user_id": anthroveUserID,
|
||||
|
@ -240,7 +240,7 @@ func TestCheckUserToPostLink(t *testing.T) {
|
||||
anthrovePostID: "123456",
|
||||
},
|
||||
want: false,
|
||||
wantErr: true,
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "Test 3: Valid AnthrovePostID and invalid AnthroveUserID",
|
||||
@ -251,7 +251,7 @@ func TestCheckUserToPostLink(t *testing.T) {
|
||||
anthrovePostID: "1234",
|
||||
},
|
||||
want: false,
|
||||
wantErr: true,
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "Test 4: Invalid AnthrovePostID and invalid AnthroveUserID",
|
||||
@ -262,7 +262,7 @@ func TestCheckUserToPostLink(t *testing.T) {
|
||||
anthrovePostID: "123456",
|
||||
},
|
||||
want: false,
|
||||
wantErr: true,
|
||||
wantErr: false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
|
Reference in New Issue
Block a user