File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/main/java/hawk/api/jwt Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1919public 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}
You can’t perform that action at this time.
0 commit comments