File tree Expand file tree Collapse file tree
src/main/java/com/okta/developer/jugtours/web Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 "eject" : " react-scripts eject"
1919 },
2020 "proxy" : " http://localhost:8080"
21- }
21+ }
Original file line number Diff line number Diff line change @@ -8,15 +8,17 @@ import { CookiesProvider } from 'react-cookie';
88
99class App extends Component {
1010 render ( ) {
11- return < CookiesProvider >
12- < Router >
13- < Switch >
14- < Route path = '/' exact = { true } component = { Home } />
15- < Route path = '/groups' exact = { true } component = { GroupList } />
16- < Route path = '/groups/:id' component = { GroupEdit } />
17- </ Switch >
18- </ Router >
19- </ CookiesProvider >
11+ return (
12+ < CookiesProvider >
13+ < Router >
14+ < Switch >
15+ < Route path = '/' exact = { true } component = { Home } />
16+ < Route path = '/groups' exact = { true } component = { GroupList } />
17+ < Route path = '/groups/:id' component = { GroupEdit } />
18+ </ Switch >
19+ </ Router >
20+ </ CookiesProvider >
21+ )
2022 }
2123}
2224
Original file line number Diff line number Diff line change @@ -28,15 +28,15 @@ class GroupController {
2828 private GroupRepository groupRepository ;
2929 private UserRepository userRepository ;
3030
31- public GroupController (GroupRepository groupRepository , UserRepository userRepository ) {
32- this .groupRepository = groupRepository ;
33- this .userRepository = userRepository ;
34- }
31+ public GroupController (GroupRepository groupRepository , UserRepository userRepository ) {
32+ this .groupRepository = groupRepository ;
33+ this .userRepository = userRepository ;
34+ }
3535
36- @ GetMapping ("/groups" )
37- Collection <Group > groups (Principal principal ) {
38- return groupRepository .findAllByUserId (principal .getName ());
39- }
36+ @ GetMapping ("/groups" )
37+ Collection <Group > groups (Principal principal ) {
38+ return groupRepository .findAllByUserId (principal .getName ());
39+ }
4040
4141 @ GetMapping ("/group/{id}" )
4242 ResponseEntity <?> getGroup (@ PathVariable Long id ) {
@@ -45,7 +45,7 @@ ResponseEntity<?> getGroup(@PathVariable Long id) {
4545 .orElse (new ResponseEntity <>(HttpStatus .NOT_FOUND ));
4646 }
4747
48- @ PostMapping ("/group" )
48+ @ PostMapping ("/group" )
4949 ResponseEntity <Group > createGroup (@ Valid @ RequestBody Group group ,
5050 @ AuthenticationPrincipal OAuth2User principal ) throws URISyntaxException {
5151 log .info ("Request to create group: {}" , group );
You can’t perform that action at this time.
0 commit comments