Users will need to able to comment on proposals proposals and vote on other users comments. They will also need to edit and delete their own comments. The proposed feature set is using dash central as a guideline.
API
GET /comments?proposalHash= -> get comments for proposal # must provide a proposal
POST /comments -> new comment
{text, proposalId, replyToId}
PUT /comments/:id -> update comment
{text}
POST /comments/:id/vote -> new vote count
{direction: -1 | 0 | 1}
DEL /comments/:id -> delete comment
Schema
comment
id: pk
userId: fk -> user.id # owner
replyToId: fk -> comment.id # if set, is a reply
text: string
comment_vote
id: pk, fk -> comment.id
userId: pk, fk -> user.id
dir: int
Overview
Users will need to able to comment on proposals proposals and vote on other users comments. They will also need to edit and delete their own comments. The proposed feature set is using dash central as a guideline.
API
Schema
References