BREAKING CHANGE: V2 of thr SDK #12
@ -40,7 +40,7 @@ func CheckIfAnthrovePostNodeExistsByAnthroveID(ctx context.Context, db *gorm.DB,
|
||||
return executeCheckQuery(ctx, db, "id = ?", string(anthrovePostID))
|
||||
}
|
||||
|
||||
func CheckIfAnthrovePostNodeExistsBySourceURL(ctx context.Context, db *gorm.DB, sourceURL string) (graphModels.AnthrovePost, bool, error) {
|
||||
func CheckIfAnthrovePostNodeExistsBySourceURL(ctx context.Context, db *gorm.DB, sourceURL string) (*graphModels.AnthrovePost, bool, error) {
|
||||
var post pgModels.Post
|
||||
err := db.WithContext(ctx).Model(&pgModels.Post{}).InnerJoins("References", db.Where("url = ?", sourceURL)).First(&post).Error
|
||||
|
||||
@ -59,7 +59,7 @@ func CheckIfAnthrovePostNodeExistsBySourceURL(ctx context.Context, db *gorm.DB,
|
||||
//TODO Now test it! :D
|
||||
// Naaa
|
||||
// D:
|
||||
return pgPost, true, nil
|
||||
return &pgPost, true, nil
|
||||
fenpaws marked this conversation as resolved
Outdated
|
||||
}
|
||||
|
||||
func CheckIfAnthrovePostNodeExistsBySourceID(ctx context.Context, db *gorm.DB, sourceID string) (bool, error) {
|
||||
|
@ -90,7 +90,7 @@ func (p *postgresqlConnection) CheckPostNodeExistsByAnthroveID(ctx context.Conte
|
||||
// CheckPostNodeExistsBySourceURL NOT WORKING! TODO!
|
||||
func (p *postgresqlConnection) CheckPostNodeExistsBySourceURL(ctx context.Context, sourceUrl string) (*graphModels.AnthrovePost, bool, error) {
|
||||
post, exists, err := postgres.CheckIfAnthrovePostNodeExistsBySourceURL(ctx, p.db, sourceUrl)
|
||||
return &post, exists, err
|
||||
return post, exists, err
|
||||
}
|
||||
|
||||
// CheckPostNodeExistsBySourceID NOT WORKING! TODO!
|
||||
|
Reference in New Issue
Block a user
didn't we call the sourceURL not postUrl or so?
Something, so we don't mix it up with domainUrl or sourceDomain...