From ecb10ed62fdff179e34f82b0ff2569da8390f4ad Mon Sep 17 00:00:00 2001 From: Saturnino Abril Date: Sat, 22 Apr 2017 21:52:03 +0900 Subject: 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 --- api4/params.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'api4/params.go') 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 { -- cgit v1.2.3-1-g7c22