diff options
author | 2017-09-05 13:53:17 +0300 | |
---|---|---|
committer | 2017-09-05 13:53:17 +0300 | |
commit | 4ea29d56746b764d14838b64d43ca1358557b50f (patch) | |
tree | 641912e24d76104bac5255036927ba6eeb2d0340 /juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java | |
parent | fb734b50962744f4cdfc51e7a228de18bc96130a (diff) |
api: no dependency on Servlet API anymore
Diffstat (limited to 'juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java')
-rw-r--r-- | juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java b/juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java index be29ee62..dc10ceba 100644 --- a/juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java +++ b/juick-api/src/main/java/com/juick/api/controllers/TelegramWebhook.java @@ -34,8 +34,8 @@ import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; import java.io.IOException; +import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.util.List; @@ -55,8 +55,8 @@ public class TelegramWebhook { @RequestMapping(value = "/tlgmbtwbhk", method = RequestMethod.POST) @ResponseStatus(value = HttpStatus.OK) - public void processUpdate(HttpServletRequest request) throws IOException { - Update update = BotUtils.parseUpdate(IOUtils.toString(request.getInputStream(), StandardCharsets.UTF_8)); + public void processUpdate(InputStream body) throws IOException { + Update update = BotUtils.parseUpdate(IOUtils.toString(body, StandardCharsets.UTF_8)); Message message = update.message(); if (update.message() == null) { message = update.editedMessage(); |