Ignore:
Timestamp:
05/24/23 23:18:47 (18 months ago)
Author:
Gjoko Kostadinov <gjoko.kostadinov@…>
Branches:
master
Children:
77205be
Parents:
8bcd64c
Message:

Periodic update

Location:
src/main/java/edu/gjoko/schedlr/controllers/rest
Files:
2 added
1 edited
1 moved

Legend:

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

    r8bcd64c r950fa0d  
    22
    33import edu.gjoko.schedlr.entity.Business;
     4import edu.gjoko.schedlr.entity.BusinessType;
    45import edu.gjoko.schedlr.services.BusinessService;
    56import lombok.AllArgsConstructor;
    6 import org.springframework.security.core.Authentication;
    7 import org.springframework.security.core.context.SecurityContextHolder;
    87import org.springframework.web.bind.annotation.*;
    98
     
    3837        return businessService.findByOwner(businessOwnerId);
    3938    }
     39
     40    @GetMapping(path = "/{businessTypeId}")
     41    public List<Business> getBusinessesByBusinessType(@PathVariable("businessTypeId") Long id) {
     42        BusinessType businessType = new BusinessType();
     43        businessType.setId(id);
     44        return businessService.findByBusinessTypeAndActiveStatus(businessType);
     45    }
    4046}
  • src/main/java/edu/gjoko/schedlr/controllers/rest/NomenclatureController.java

    r8bcd64c r950fa0d  
    22
    33import edu.gjoko.schedlr.entity.BusinessType;
    4 import edu.gjoko.schedlr.repositories.BusinessTypeRepository;
    54import edu.gjoko.schedlr.services.NomenclaturesService;
    65import lombok.AllArgsConstructor;
     
    1413@RequestMapping("api/nomenclatures")
    1514@AllArgsConstructor
    16 public class NomenclaturesController {
     15public class NomenclatureController {
    1716
    1817    private final NomenclaturesService nomenclaturesService;
Note: See TracChangeset for help on using the changeset viewer.