Skip to content

Commit 1c69347

Browse files
committed
Added back token route
1 parent 7d2bb85 commit 1c69347

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/main/java/hawk/api/jwt/JwtUserController.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@
1919
public class JwtUserController {
2020

2121
private final UserService userService;
22+
private final UserSearchService userSearchService;
2223

2324
@Autowired
24-
public JwtUserController(UserService userService) {
25+
public JwtUserController(UserService userService, UserSearchService userSearchService) {
2526
this.userService = userService;
27+
this.userSearchService = userSearchService;
2628
}
2729

2830
@GetMapping("/search/")
@@ -36,4 +38,10 @@ public ResponseEntity search(@PathVariable("text") String text) {
3638
Search search = new Search(text);
3739
return ResponseEntity.ok(this.userService.findUsersByName(search.getSearchText()));
3840
}
41+
42+
@GetMapping("/search/bad/{text}")
43+
public ResponseEntity searchCrappy(@PathVariable("text") String text) {
44+
Search search = new Search(text);
45+
return ResponseEntity.ok(this.userSearchService.search(search));
46+
}
3947
}

0 commit comments

Comments
 (0)