Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sqshq committed Mar 13, 2016
1 parent c860bf0 commit 7e37b64
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 deletions.
16 changes: 0 additions & 16 deletions auth-service/src/main/resources/application.yml

This file was deleted.

2 changes: 0 additions & 2 deletions registry/src/main/resources/application.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ public class StatisticsController {
@Autowired
private StatisticsService statisticsService;

@RequestMapping(value = "/current", method = RequestMethod.GET)
public List<DataPoint> getCurrentAccountStatistics(Principal principal) {
return statisticsService.findByAccountName(principal.getName());
}

//@PreAuthorize("#oauth2.hasScope('server') or #accountName.equals('demo')")
@RequestMapping(value = "/{accountName}", method = RequestMethod.GET)
public List<DataPoint> getStatisticsByAccountName(@PathVariable String accountName) {
return statisticsService.findByAccountName(accountName);
}

@RequestMapping(value = "/current", method = RequestMethod.GET)
public List<DataPoint> getAccountStatistics(Principal principal) {
return statisticsService.findByAccountName(principal.getName());
}

//@PreAuthorize("#oauth2.hasScope('server')")
@RequestMapping(value = "/{accountName}", method = RequestMethod.PUT)
public void saveAccountStatistics(@PathVariable String accountName, @Valid @RequestBody Account account) {
Expand Down

0 comments on commit 7e37b64

Please sign in to comment.