]> source.dussan.org Git - gitea.git/commit
[API] Fix 9544 | return 200 when reaction already exist (#9550)
author6543 <6543@obermui.de>
Tue, 31 Dec 2019 08:21:21 +0000 (09:21 +0100)
committertechknowlogick <techknowlogick@gitea.io>
Tue, 31 Dec 2019 08:21:21 +0000 (03:21 -0500)
commit9600c27085df3f895b2128f1b77aa0ce0b57e7f2
tree9dfbbf44126e7c39b77558ec943c8a2b9a717b10
parent655aea13a5ad5dd51bcaafd1b96ecce2673f0312
[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>
integrations/api_issue_reaction_test.go
models/error.go
models/issue_reaction.go
models/issue_reaction_test.go
modules/structs/issue_reaction.go
routers/api/v1/repo/issue_reaction.go
routers/api/v1/swagger/issue.go
routers/api/v1/swagger/options.go
templates/swagger/v1_json.tmpl