| 36321 |
vikas |
1 |
package com.spice.profitmandi.web.v2.controller;
|
|
|
2 |
|
|
|
3 |
import com.spice.profitmandi.web.controller.PageController;
|
|
|
4 |
import com.spice.profitmandi.web.v2.response.ApiResponse;
|
|
|
5 |
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
6 |
import org.springframework.http.ResponseEntity;
|
|
|
7 |
import org.springframework.web.bind.annotation.*;
|
|
|
8 |
|
|
|
9 |
import javax.servlet.http.HttpServletRequest;
|
|
|
10 |
|
|
|
11 |
@RestController
|
|
|
12 |
@RequestMapping("/v2")
|
|
|
13 |
public class V2PageController extends V2BaseController {
|
|
|
14 |
|
|
|
15 |
@Autowired
|
|
|
16 |
private PageController pageController;
|
|
|
17 |
|
|
|
18 |
@GetMapping("/pages")
|
|
|
19 |
public ResponseEntity<ApiResponse<?>> index(HttpServletRequest request) throws Throwable {
|
|
|
20 |
return wrapResponse(pageController.index(request));
|
|
|
21 |
}
|
|
|
22 |
|
|
|
23 |
@GetMapping("/pages/{page}")
|
|
|
24 |
public ResponseEntity<ApiResponse<?>> getPage(HttpServletRequest request,
|
|
|
25 |
@PathVariable String page) throws Throwable {
|
|
|
26 |
return wrapResponse(pageController.getPage(request, page));
|
|
|
27 |
}
|
|
|
28 |
|
|
|
29 |
@GetMapping("/pages/web-listing/{id}")
|
|
|
30 |
public ResponseEntity<ApiResponse<?>> webListing(HttpServletRequest request,
|
|
|
31 |
@PathVariable int id) throws Throwable {
|
|
|
32 |
return wrapResponse(pageController.webListing(request, id));
|
|
|
33 |
}
|
|
|
34 |
}
|