mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
[API] Fix 9544 | return 200 when reaction already exist (#9550)
* add ErrReactionAlreadyExist * extend CreateReaction * reaction already exist = 200 * extend FindReactionsOptions * refactor swagger options/definitions * fix swagger-validate * Update models/error.go Co-Authored-By: zeripath <art27@cantab.net> * fix test PART1 * extend FindReactionsOptions with UserID option * catch error on test * fix test PART2 * format ... Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <matti@mdranta.net>
This commit is contained in:
parent
655aea13a5
commit
9600c27085
9 changed files with 119 additions and 79 deletions
|
@ -13,8 +13,8 @@ type EditReactionOption struct {
|
|||
Reaction string `json:"content"`
|
||||
}
|
||||
|
||||
// ReactionResponse contain one reaction
|
||||
type ReactionResponse struct {
|
||||
// Reaction contain one reaction
|
||||
type Reaction struct {
|
||||
User *User `json:"user"`
|
||||
Reaction string `json:"content"`
|
||||
// swagger:strfmt date-time
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue