refactor(postgres): renamed functions to be more clear
Signed-off-by: soxx <soxx@fenpa.ws>
This commit is contained in:
parent
78145fe02a
commit
55296d9a95
@ -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)
|
||||||
|
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user