Changeset f29cd58 for src/main/java/edu/gjoko/schedlr/controllers
- Timestamp:
- 01/15/24 00:11:01 (10 months ago)
- Branches:
- master
- Children:
- 943857c
- Parents:
- e8999eb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/edu/gjoko/schedlr/controllers/rest/ServiceApi.java
re8999eb rf29cd58 1 1 package edu.gjoko.schedlr.controllers.rest; 2 2 3 import edu.gjoko.schedlr.dto.ServiceDto; 3 4 import edu.gjoko.schedlr.entity.Service; 5 import edu.gjoko.schedlr.mappers.ServiceDtoMapper; 4 6 import edu.gjoko.schedlr.services.ServicesService; 5 7 import lombok.AllArgsConstructor; … … 18 20 19 21 private ServicesService service; 22 private ServiceDtoMapper serviceDtoMapper; 20 23 @PostMapping(path="/delete") 21 24 public void saveBusiness(@RequestBody List<Service> serviceList) { … … 34 37 service.saveOrUpdateServices(serviceList, ownerId); 35 38 } 39 40 @GetMapping 41 public List<ServiceDto> searchServicesByKeyWord(@RequestParam(value = "searchKeyword", required = false) String searchKeyWord) { 42 return service.getServicesByKeyword(searchKeyWord) 43 .stream() 44 .map(serviceDtoMapper::serviceToServiceDto) 45 .toList(); 46 } 36 47 }
Note:
See TracChangeset
for help on using the changeset viewer.