From 80684ad69f641bb759095beff0e1a15db0aa33b1 Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Mon, 17 Apr 2017 16:07:28 +0200 Subject: implement DELETE /emoji/{emoji_id} fro apiV4 (#6021) implement GET /emoji/{emoji_id} for apiv4 --- api4/context.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'api4/context.go') diff --git a/api4/context.go b/api4/context.go index 90f39ce5f..0566fbc23 100644 --- a/api4/context.go +++ b/api4/context.go @@ -405,6 +405,17 @@ func (c *Context) RequireReportId() *Context { return c } +func (c *Context) RequireEmojiId() *Context { + if c.Err != nil { + return c + } + + if len(c.Params.EmojiId) != 26 { + c.SetInvalidUrlParam("emoji_id") + } + return c +} + func (c *Context) RequireTeamName() *Context { if c.Err != nil { return c -- cgit v1.2.3-1-g7c22