| 32916 |
amit.gupta |
1 |
package com.spice.profitmandi.web.controller;
|
|
|
2 |
|
| 32919 |
amit.gupta |
3 |
import com.fasterxml.jackson.databind.ObjectMapper;
|
| 32918 |
amit.gupta |
4 |
import com.spice.profitmandi.service.smartping.model.CallDetailModel;
|
| 32916 |
amit.gupta |
5 |
import com.spice.profitmandi.web.util.MVCResponseSender;
|
|
|
6 |
import org.apache.logging.log4j.LogManager;
|
|
|
7 |
import org.apache.logging.log4j.Logger;
|
|
|
8 |
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
9 |
import org.springframework.stereotype.Controller;
|
|
|
10 |
import org.springframework.ui.Model;
|
|
|
11 |
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
12 |
import org.springframework.web.bind.annotation.RequestMethod;
|
| 32918 |
amit.gupta |
13 |
import org.springframework.web.bind.annotation.RequestParam;
|
| 32916 |
amit.gupta |
14 |
|
|
|
15 |
import javax.servlet.http.HttpServletRequest;
|
|
|
16 |
import javax.transaction.Transactional;
|
|
|
17 |
|
|
|
18 |
@Controller
|
|
|
19 |
@Transactional(rollbackOn = Throwable.class)
|
|
|
20 |
public class WebHookController {
|
|
|
21 |
|
|
|
22 |
@Autowired
|
|
|
23 |
MVCResponseSender mvcResponseSender;
|
|
|
24 |
|
|
|
25 |
private static final Logger LOGGER = LogManager.getLogger(WebHookController.class);
|
|
|
26 |
|
| 32919 |
amit.gupta |
27 |
@Autowired
|
|
|
28 |
ObjectMapper objectMapper;
|
| 32916 |
amit.gupta |
29 |
|
| 32917 |
amit.gupta |
30 |
@RequestMapping(value = "/click2call/report-handler", method = RequestMethod.POST)
|
| 32919 |
amit.gupta |
31 |
public String click2callReportHandlerPost(HttpServletRequest request, Model model, @RequestParam(name = "push_report") String report) throws Exception {
|
| 32917 |
amit.gupta |
32 |
|
|
|
33 |
LOGGER.info("Report - {}", report);
|
|
|
34 |
model.addAttribute("response1", mvcResponseSender.createResponseString("GODBLESSYOU"));
|
|
|
35 |
return "response";
|
|
|
36 |
}
|
| 32916 |
amit.gupta |
37 |
}
|