Changeset 53765dd for src/main/java/edu/gjoko/schedlr/controllers/rest
- Timestamp:
- 01/04/24 09:07:47 (11 months ago)
- Branches:
- master
- Children:
- e8999eb
- Parents:
- 1413ee2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/edu/gjoko/schedlr/controllers/rest/NomenclatureApi.java
r1413ee2 r53765dd 2 2 3 3 import edu.gjoko.schedlr.entity.BusinessType; 4 import edu.gjoko.schedlr.entity.ServiceType; 4 5 import edu.gjoko.schedlr.services.NomenclaturesService; 5 6 import lombok.AllArgsConstructor; 6 7 import org.springframework.web.bind.annotation.GetMapping; 8 import org.springframework.web.bind.annotation.PathVariable; 7 9 import org.springframework.web.bind.annotation.RequestMapping; 8 10 import org.springframework.web.bind.annotation.RestController; 9 11 12 import javax.servlet.http.HttpServletRequest; 10 13 import java.util.List; 11 14 12 15 @RestController 13 @RequestMapping("api/nomenclature s")16 @RequestMapping("api/nomenclature") 14 17 @AllArgsConstructor 15 18 public class NomenclatureApi { … … 20 23 return nomenclaturesService.getBusinessTypes(); 21 24 } 25 26 @GetMapping( "/serviceTypes/me") 27 public List<ServiceType> getServiceTypesForBusinessType( HttpServletRequest request) { 28 Long ownerId = (long) request.getSession(true).getAttribute("stakeholderId"); 29 return nomenclaturesService.findAppropriateBusinessTypesForBusinessByOwnerId(ownerId); 30 } 22 31 }
Note:
See TracChangeset
for help on using the changeset viewer.