Archived
Add search engine.
This commit is contained in:
@@ -54,7 +54,9 @@ public class PostController {
|
||||
public PostDTO getByKey(@PathVariable("postKey") final String pPostKey,
|
||||
final HttpServletResponse response) {
|
||||
final PostDTO result = getByKeyAndSource(pPostKey, response);
|
||||
result.setText(parserService.parse(result.getText()));
|
||||
if(result != null) {
|
||||
result.setText(parserService.parse(result.getText()));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -79,10 +81,9 @@ public class PostController {
|
||||
.map(PostDTO::new).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@PostMapping("/search")
|
||||
public List<Post> search() {
|
||||
// TODO
|
||||
return null;
|
||||
@GetMapping("/search/{searchCriteria}")
|
||||
public List<PostDTO> search(@PathVariable("searchCriteria") final String pSearchCriteria) {
|
||||
return postService.search(pSearchCriteria);
|
||||
}
|
||||
|
||||
@GetMapping("/byCategory/{categoryId}")
|
||||
|
||||
Reference in New Issue
Block a user