1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Add reactions to issues/PR and comments (#2856)

This commit is contained in:
Lauris BH
2017-12-04 01:14:26 +02:00
committed by GitHub
parent e59adcde65
commit 5dc37b187c
24 changed files with 677 additions and 8 deletions

View File

@@ -268,6 +268,16 @@ func (f *CreateCommentForm) Validate(ctx *macaron.Context, errs binding.Errors)
return validate(errs, ctx.Data, f, ctx.Locale)
}
// ReactionForm form for adding and removing reaction
type ReactionForm struct {
Content string `binding:"Required;In(+1,-1,laugh,confused,heart,hooray)"`
}
// Validate validates the fields
func (f *ReactionForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {
return validate(errs, ctx.Data, f, ctx.Locale)
}
// _____ .__.__ __
// / \ |__| | ____ _______/ |_ ____ ____ ____
// / \ / \| | | _/ __ \ / ___/\ __\/ _ \ / \_/ __ \