mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +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:
@@ -99,23 +99,16 @@ type swaggerResponseStopWatchList struct {
|
||||
Body []api.StopWatch `json:"body"`
|
||||
}
|
||||
|
||||
// EditReactionOption
|
||||
// swagger:response EditReactionOption
|
||||
type swaggerEditReactionOption struct {
|
||||
// Reaction
|
||||
// swagger:response Reaction
|
||||
type swaggerReaction struct {
|
||||
// in:body
|
||||
Body api.EditReactionOption `json:"body"`
|
||||
Body api.Reaction `json:"body"`
|
||||
}
|
||||
|
||||
// ReactionResponse
|
||||
// swagger:response ReactionResponse
|
||||
type swaggerReactionResponse struct {
|
||||
// ReactionList
|
||||
// swagger:response ReactionList
|
||||
type swaggerReactionList struct {
|
||||
// in:body
|
||||
Body api.ReactionResponse `json:"body"`
|
||||
}
|
||||
|
||||
// ReactionResponseList
|
||||
// swagger:response ReactionResponseList
|
||||
type swaggerReactionResponseList struct {
|
||||
// in:body
|
||||
Body []api.ReactionResponse `json:"body"`
|
||||
Body []api.Reaction `json:"body"`
|
||||
}
|
||||
|
@@ -123,4 +123,7 @@ type swaggerParameterBodies struct {
|
||||
|
||||
// in:body
|
||||
RepoTopicOptions api.RepoTopicOptions
|
||||
|
||||
// in:body
|
||||
EditReactionOption api.EditReactionOption
|
||||
}
|
||||
|
Reference in New Issue
Block a user