Last change
on this file since 351c43f was 33d4f5d, checked in by Vzdra <vladko.zdravkovski@…>, 4 years ago |
bugfixes and refactoring
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | package it.finki.tinki.web.controller;
|
---|
2 |
|
---|
3 | import it.finki.tinki.model.dto.response.work.InternshipResponseDTO;
|
---|
4 | import it.finki.tinki.model.dto.response.work.JobResponseDTO;
|
---|
5 | import it.finki.tinki.model.dto.response.work.ProjectResponseDTO;
|
---|
6 | import it.finki.tinki.service.WorkService;
|
---|
7 | import org.springframework.web.bind.annotation.*;
|
---|
8 |
|
---|
9 | import java.util.List;
|
---|
10 |
|
---|
11 | @RestController
|
---|
12 | @CrossOrigin("http://localhost:3000")
|
---|
13 | @RequestMapping("/api/search")
|
---|
14 | public class SearchController {
|
---|
15 |
|
---|
16 | WorkService workService;
|
---|
17 |
|
---|
18 | public SearchController(WorkService workService) {
|
---|
19 | this.workService = workService;
|
---|
20 | }
|
---|
21 |
|
---|
22 | @GetMapping(path = "/job")
|
---|
23 | public List<JobResponseDTO> jobRes(@RequestParam(name = "text") String text){
|
---|
24 | return this.workService.fullTextJobSearch(text);
|
---|
25 | }
|
---|
26 |
|
---|
27 | @GetMapping(path = "/internship")
|
---|
28 | public List<InternshipResponseDTO> internshipRes(@RequestParam(name = "text") String text){
|
---|
29 | return this.workService.fullTextInternshipSearch(text);
|
---|
30 | }
|
---|
31 |
|
---|
32 | @GetMapping(path = "/project")
|
---|
33 | public List<ProjectResponseDTO> projectRes(@RequestParam(name = "text") String text){
|
---|
34 | return this.workService.fullTextProjectSearch(text);
|
---|
35 | }
|
---|
36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.