diff options
author | Saturnino Abril <saturnino.abril@gmail.com> | 2017-04-22 21:52:03 +0900 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-04-22 08:52:03 -0400 |
commit | ecb10ed62fdff179e34f82b0ff2569da8390f4ad (patch) | |
tree | e2405ed87a31cca42275b98a76e1312c0a1867eb /api4/params.go | |
parent | e62afeace04e2abd23fa78a0a54e0a5d2e17e0b7 (diff) | |
download | chat-ecb10ed62fdff179e34f82b0ff2569da8390f4ad.tar.gz chat-ecb10ed62fdff179e34f82b0ff2569da8390f4ad.tar.bz2 chat-ecb10ed62fdff179e34f82b0ff2569da8390f4ad.zip |
APIv4 DELETE /users/{user_id}/posts/{post_id}/reactions/name (#6117)
* APIv4 DELETE /users/{user_id}/posts/{post_id}/reactions/name
* updated v3 deleteReaction endpoint
* update parameter of app.DeleteReactionForPost()
* update utils.IsValidAlphaNum, add utils.IsValidAlphaNumHyphenUnderscore, and add related tests
Diffstat (limited to 'api4/params.go')
-rw-r--r-- | api4/params.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/api4/params.go b/api4/params.go index a1c829f1c..5febf06fb 100644 --- a/api4/params.go +++ b/api4/params.go @@ -32,6 +32,7 @@ type ApiParams struct { TeamName string ChannelName string PreferenceName string + EmojiName string Category string Service string Page int @@ -111,6 +112,10 @@ func ApiParamsFromRequest(r *http.Request) *ApiParams { params.PreferenceName = val } + if val, ok := props["emoji_name"]; ok { + params.EmojiName = val + } + if val, err := strconv.Atoi(r.URL.Query().Get("page")); err != nil || val < 0 { params.Page = PAGE_DEFAULT } else { |