Last change
on this file was 1413ee2, checked in by gjoko kostadinov <gjokokostadinov@…>, 6 months ago |
Add all bug fixes.
|
-
Property mode
set to
100644
|
File size:
918 bytes
|
Rev | Line | |
---|
[1413ee2] | 1 | package edu.gjoko.schedlr.controllers.rest;
|
---|
| 2 |
|
---|
| 3 | import edu.gjoko.schedlr.entity.Business;
|
---|
| 4 | import edu.gjoko.schedlr.services.BusinessService;
|
---|
| 5 | import lombok.AllArgsConstructor;
|
---|
| 6 | import org.springframework.web.bind.annotation.PatchMapping;
|
---|
| 7 | import org.springframework.web.bind.annotation.RequestBody;
|
---|
| 8 | import org.springframework.web.bind.annotation.RequestMapping;
|
---|
| 9 | import org.springframework.web.bind.annotation.RestController;
|
---|
| 10 |
|
---|
| 11 | import javax.servlet.http.HttpServletRequest;
|
---|
| 12 | import java.util.List;
|
---|
| 13 |
|
---|
| 14 | @RestController
|
---|
| 15 | @RequestMapping("api/admin")
|
---|
| 16 | @AllArgsConstructor
|
---|
| 17 | public class AdminApi {
|
---|
| 18 |
|
---|
| 19 | private final BusinessService businessService;
|
---|
| 20 |
|
---|
| 21 | @PatchMapping
|
---|
| 22 | public void updateBusinessStatus(@RequestBody List<Business> businessList, HttpServletRequest request) {
|
---|
| 23 | Long customerId = (long) request.getSession(true).getAttribute("stakeholderId");
|
---|
| 24 | businessService.updateBusinessStatuses(businessList);
|
---|
| 25 | }
|
---|
| 26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.