Skip to content

Commit

Permalink
Optimize ConsumerController related interface declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
klboke committed Jul 5, 2022
1 parent 133ec23 commit ef347b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public ConsumerToken createConsumer(@RequestBody Consumer consumer,
}

@PreAuthorize(value = "@permissionValidator.isSuperAdmin()")
@GetMapping(value = "/consumers/by-appId")
@GetMapping(value = "/consumer-tokens/by-appId")
public ConsumerToken getConsumerTokenByAppId(@RequestParam String appId) {
return consumerService.getConsumerTokenByAppId(appId);
}
Expand Down Expand Up @@ -120,13 +120,13 @@ public List<ConsumerRole> assignNamespaceRoleToConsumer(@PathVariable String tok
return consumerService.assignNamespaceRoleToConsumer(token, appId, namespaceName);
}

@GetMapping("/consumers/list")
@GetMapping("/consumers")
@PreAuthorize(value = "@permissionValidator.isSuperAdmin()")
public List<Consumer> getConsumerList(Pageable page){
return consumerService.findAllConsumer(page);
}

@DeleteMapping(value = "/consumers/delete/by-appId")
@DeleteMapping(value = "/consumers/by-appId")
@PreAuthorize(value = "@permissionValidator.isSuperAdmin()")
public void deleteConsumers(@RequestParam String appId) {
consumerService.deleteConsumer(appId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ appService.service('ConsumerService', ['$resource', '$q', 'AppUtil',
get_consumer_token_by_appId: {
method: 'GET',
isArray: false,
url: AppUtil.prefixPath() + '/consumers/by-appId'
url: AppUtil.prefixPath() + '/consumer-tokens/by-appId'
},
assign_role_to_consumer: {
method: 'POST',
Expand All @@ -35,12 +35,12 @@ appService.service('ConsumerService', ['$resource', '$q', 'AppUtil',
get_consumer_list: {
method: 'GET',
isArray: true,
url: AppUtil.prefixPath() + '/consumers/list'
url: AppUtil.prefixPath() + '/consumers'
},
delete_consumer: {
method: 'DELETE',
isArray: false,
url: AppUtil.prefixPath() + '/consumers/delete/by-appId'
url: AppUtil.prefixPath() + '/consumers/by-appId'
}

});
Expand Down

0 comments on commit ef347b3

Please sign in to comment.