Skip to content

Commit ea4d0c3

Browse files
committed
ready define API
1 parent 825c0e7 commit ea4d0c3

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

routers/api/v1/api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,8 @@ func RegisterRoutes(m *macaron.Macaron) {
674674
Delete(repo.DeleteIssueCommentDeprecated)
675675
m.Combo("/reactions").
676676
Get(bind(api.CommentReactionList{}), repo.GetCommentReactions).
677-
Put(reqToken(), repo.AddCommentReaction).
678-
Delete(reqToken(), repo.DelCommentReaction)
677+
Put(reqToken(), api.CommentReaction{}, repo.AddCommentReaction).
678+
Delete(reqToken(), api.CommentReaction{}, repo.DelCommentReaction)
679679
})
680680
})
681681

routers/api/v1/repo/issue_comment.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,3 +393,21 @@ func deleteIssueComment(ctx *context.APIContext) {
393393

394394
ctx.Status(204)
395395
}
396+
397+
func GetCommentReactions(ctx *context.APIContext, form api.CommentReactionList) {
398+
399+
}
400+
401+
func AddCommentReaction(ctx *context.APIContext, form api.CommentReaction) {
402+
403+
setCommentReaction(ctx, form, true)
404+
}
405+
406+
func DelCommentReaction(ctx *context.APIContext, form api.CommentReaction) {
407+
408+
setCommentReaction(ctx, form, false)
409+
}
410+
411+
func setCommentReaction(ctx *context.APIContext, form api.CommentReaction, create bool) {
412+
413+
}

0 commit comments

Comments
 (0)