Skip to content

Conversation

@6543
Copy link
Member

@6543 6543 commented Jun 2, 2020

close #11330

GET ​/settings​/allowed_reactions

[
  "string"
]

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 2, 2020
@mrsdizzie
Copy link
Member

Could add a small test to see it works too?

@6543
Copy link
Member Author

6543 commented Jun 2, 2020

@mrsdizzie sorry was in a rush when I wrote that code

@6543
Copy link
Member Author

6543 commented Jun 2, 2020

PS: added the code to integration test since adding it to the normal Tests result in a wrong test result

@jolheiser jolheiser added the modifies/api This PR adds API routes or modifies them label Jun 2, 2020
@jolheiser jolheiser added this to the 1.13.0 milestone Jun 2, 2020
@6543 6543 requested a review from mrsdizzie June 3, 2020 11:57
@6543
Copy link
Member Author

6543 commented Jun 3, 2020

@lafriks did not work

@lafriks
Copy link
Member

lafriks commented Jun 3, 2020

oh, setting.UI.ReactionsMap is map. Than you can use:

assert.ElementsMatch(t, reflect.ValueOf(setting.UI.ReactionsMap).MapKeys(), *a)

@lafriks
Copy link
Member

lafriks commented Jun 3, 2020

oh, I'm squared :D missing import btw ;)

@6543 6543 force-pushed the api_expose-allowed-reactions branch from c2435ab to 68b8b45 Compare June 3, 2020 16:19
@6543
Copy link
Member Author

6543 commented Jun 3, 2020

@lafriks now it should WORK

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 3, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 4, 2020
@lafriks
Copy link
Member

lafriks commented Jun 4, 2020

make lg-tm work

@lafriks lafriks merged commit b534a51 into go-gitea:master Jun 4, 2020
@6543 6543 deleted the api_expose-allowed-reactions branch June 4, 2020 09:37
@lafriks lafriks added the type/enhancement An improvement of existing functionality label Jun 4, 2020
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
* [API] Expose allowed Reactions

* dont be in soutch a rush

* add TEST

* use ElementsMatch

Co-authored-by: Lauris BH <lauris@nix.lv>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them type/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] [API] Expose allowed Reactions

5 participants