Ignore:
Timestamp:
01/04/24 09:07:47 (10 months ago)
Author:
gjoko kostadinov <gjokokostadinov@…>
Branches:
master
Children:
e8999eb
Parents:
1413ee2
Message:

Fix bugs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/edu/gjoko/schedlr/controllers/rest/NomenclatureApi.java

    r1413ee2 r53765dd  
    22
    33import edu.gjoko.schedlr.entity.BusinessType;
     4import edu.gjoko.schedlr.entity.ServiceType;
    45import edu.gjoko.schedlr.services.NomenclaturesService;
    56import lombok.AllArgsConstructor;
    67import org.springframework.web.bind.annotation.GetMapping;
     8import org.springframework.web.bind.annotation.PathVariable;
    79import org.springframework.web.bind.annotation.RequestMapping;
    810import org.springframework.web.bind.annotation.RestController;
    911
     12import javax.servlet.http.HttpServletRequest;
    1013import java.util.List;
    1114
    1215@RestController
    13 @RequestMapping("api/nomenclatures")
     16@RequestMapping("api/nomenclature")
    1417@AllArgsConstructor
    1518public class NomenclatureApi {
     
    2023        return nomenclaturesService.getBusinessTypes();
    2124    }
     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    }
    2231}
Note: See TracChangeset for help on using the changeset viewer.