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

Add entire code

Location:
src/main/java/edu/gjoko/schedlr/controllers/rest
Files:
3 added
1 deleted
3 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}
  • src/main/java/edu/gjoko/schedlr/controllers/rest/NomenclatureApi.java

    • Property mode changed from 100644 to 100755
    r950fa0d r77205be  
    1313@RequestMapping("api/nomenclatures")
    1414@AllArgsConstructor
    15 public class NomenclatureController {
     15public class NomenclatureApi {
    1616
    1717    private final NomenclaturesService nomenclaturesService;
  • src/main/java/edu/gjoko/schedlr/controllers/rest/UserApi.java

    • Property mode changed from 100644 to 100755
    r950fa0d r77205be  
    11package edu.gjoko.schedlr.controllers.rest;
    22
    3 import edu.gjoko.schedlr.entity.Business;
    43import lombok.AllArgsConstructor;
    54import org.springframework.web.bind.annotation.GetMapping;
     
    87
    98import javax.servlet.http.HttpServletRequest;
    10 import java.util.List;
    119
    1210@RestController
    1311@RequestMapping("api/user")
    1412@AllArgsConstructor
    15 public class UserController {
     13public class UserApi {
    1614
    1715    @GetMapping(path = "/me")
Note: See TracChangeset for help on using the changeset viewer.