Skip to content

Commit 9a66f25

Browse files
committed
Polishing
1 parent fde2c5e commit 9a66f25

3 files changed

Lines changed: 21 additions & 19 deletions

File tree

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
"eject": "react-scripts eject"
1919
},
2020
"proxy": "http://localhost:8080"
21-
}
21+
}

app/src/App.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ import { CookiesProvider } from 'react-cookie';
88

99
class 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

src/main/java/com/okta/developer/jugtours/web/GroupController.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)