BREAKING CHANGE: V2 of thr SDK #12

Merged
fenpaws merged 124 commits from develop/postgresql into main 2024-07-01 20:46:28 +00:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit 55296d9a95 - Show all commits

View File

@ -22,11 +22,11 @@ type OtterSpace interface {
CheckUserPostLink(ctx context.Context, anthroveUserID models.AnthroveUserID, sourcePostID string, sourceUrl string) (bool, error) CheckUserPostLink(ctx context.Context, anthroveUserID models.AnthroveUserID, sourcePostID string, sourceUrl string) (bool, error)
CheckPostNodeExistsByAnthroveID(ctx context.Context, anthrovePost *models.Post) (*models.Post, error) GetPostByAnthroveID(ctx context.Context, anthrovePost *models.Post) (*models.Post, error)
CheckPostNodeExistsBySourceURL(ctx context.Context, sourceUrl string) (*models.Post, error) GetPostBySourceURL(ctx context.Context, sourceUrl string) (*models.Post, error)
CheckPostNodeExistsBySourceID(ctx context.Context, sourcePostID string) (*models.Post, error) GetPostBySourceID(ctx context.Context, sourcePostID string) (*models.Post, error)
GetUserFavoriteCount(ctx context.Context, anthroveUserID models.AnthroveUserID) (int64, error) GetUserFavoriteCount(ctx context.Context, anthroveUserID models.AnthroveUserID) (int64, error)

View File

@ -92,15 +92,15 @@ func (p *postgresqlConnection) CheckUserPostLink(ctx context.Context, anthroveUs
return postgres.CheckUserToPostLink(ctx, p.db, anthroveUserID, models.AnthrovePostID(sourcePostID)) return postgres.CheckUserToPostLink(ctx, p.db, anthroveUserID, models.AnthrovePostID(sourcePostID))
} }
func (p *postgresqlConnection) CheckPostNodeExistsByAnthroveID(ctx context.Context, anthrovePost *models.Post) (*models.Post, error) { func (p *postgresqlConnection) GetPostByAnthroveID(ctx context.Context, anthrovePost *models.Post) (*models.Post, error) {
return postgres.GetPostByAnthroveID(ctx, p.db, anthrovePost.ID) return postgres.GetPostByAnthroveID(ctx, p.db, anthrovePost.ID)
} }
func (p *postgresqlConnection) CheckPostNodeExistsBySourceURL(ctx context.Context, sourceUrl string) (*models.Post, error) { func (p *postgresqlConnection) GetPostBySourceURL(ctx context.Context, sourceUrl string) (*models.Post, error) {
return postgres.GetPostBySourceURL(ctx, p.db, sourceUrl) return postgres.GetPostBySourceURL(ctx, p.db, sourceUrl)
} }
func (p *postgresqlConnection) CheckPostNodeExistsBySourceID(ctx context.Context, sourcePostID string) (*models.Post, error) { func (p *postgresqlConnection) GetPostBySourceID(ctx context.Context, sourcePostID string) (*models.Post, error) {
return postgres.GetPostBySourceID(ctx, p.db, sourcePostID) return postgres.GetPostBySourceID(ctx, p.db, sourcePostID)
} }