Add nested posts UI (#5)
## Summary - Cut hunt, question, submission, voting, hiding, and profile flows over to unified posts - Render nested replies with permission-aware inline Reply/Edit controls and edited markers - Add post profile queries and the author index migration they depend on Co-authored-by: codegirl-007 <s.raide@gmail.com>
This commit was merged in pull request #5.
This commit is contained in:
@@ -157,6 +157,10 @@ func (p *Postgres) GetPostThread(ctx context.Context, rootID string) (*Post, err
|
||||
return GetPostThread(ctx, p.db, rootID)
|
||||
}
|
||||
|
||||
func (p *Postgres) GetPostThreadForViewer(ctx context.Context, rootID, viewerID string) (*Post, error) {
|
||||
return GetPostThreadForViewer(ctx, p.db, rootID, viewerID)
|
||||
}
|
||||
|
||||
func (p *Postgres) UpdatePost(ctx context.Context, post *Post) error {
|
||||
post.db = p.db
|
||||
return post.Update(ctx)
|
||||
@@ -166,6 +170,18 @@ func (p *Postgres) ListRootPosts(ctx context.Context, postDate, viewerID string)
|
||||
return ListRootPosts(ctx, p.db, postDate, viewerID)
|
||||
}
|
||||
|
||||
func (p *Postgres) ListRootPostsByAuthor(ctx context.Context, authorID string) ([]Post, error) {
|
||||
return ListRootPostsByAuthor(ctx, p.db, authorID)
|
||||
}
|
||||
|
||||
func (p *Postgres) ListRootPostsAnsweredBy(ctx context.Context, adminID string) ([]Post, error) {
|
||||
return ListRootPostsAnsweredBy(ctx, p.db, adminID)
|
||||
}
|
||||
|
||||
func (p *Postgres) SetRootPostState(ctx context.Context, id string, state PostState) error {
|
||||
return SetRootPostState(ctx, p.db, id, state)
|
||||
}
|
||||
|
||||
func (p *Postgres) VotePost(ctx context.Context, userID, postID string, value int) error {
|
||||
return SetPostVote(ctx, p.db, userID, postID, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user