Ignore:
Timestamp:
12/26/23 18:50:43 (10 months ago)
Author:
gjoko kostadinov <gjokokostadinov@…>
Branches:
master
Children:
1413ee2
Parents:
950fa0d
Message:

Add entire code

File:
1 moved

Legend:

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

    • Property mode changed from 100644 to 100755
    r950fa0d r77205be  
    22
    33import edu.gjoko.schedlr.entity.Business;
    4 import edu.gjoko.schedlr.entity.BusinessType;
    54import edu.gjoko.schedlr.services.BusinessService;
    65import lombok.AllArgsConstructor;
     
    1312@RequestMapping("api/business")
    1413@AllArgsConstructor
    15 public class BusinessController {
     14public class BusinessApi {
    1615
    17     final BusinessService businessService;
     16    private final BusinessService businessService;
    1817
    1918    @PostMapping
    20     public void getBusinessTypes(@RequestBody Business business) {
     19    public void saveBusiness(@RequestBody Business business) {
    2120        businessService.saveBusiness(business);
    2221    }
     
    4039    @GetMapping(path = "/{businessTypeId}")
    4140    public List<Business> getBusinessesByBusinessType(@PathVariable("businessTypeId") Long id) {
    42         BusinessType businessType = new BusinessType();
    43         businessType.setId(id);
    44         return businessService.findByBusinessTypeAndActiveStatus(businessType);
     41        return businessService.findByBusinessTypeAndActiveStatus(id);
    4542    }
    4643}
Note: See TracChangeset for help on using the changeset viewer.