@ -82,7 +82,9 @@ public class ConfigController {
|
||||
}
|
||||
}
|
||||
|
||||
public ResponseEntity<String> initAdmin(@RequestParam("ticket") String ticket){
|
||||
@PostMapping(path = "/admin/init")
|
||||
@ApiOperation("It can be run only in the initialization of the application. It will create admin user to manage the application.")
|
||||
public ResponseEntity<String> initAdmin(@RequestParam("ticket") @ApiParam(value = "Ticket for validation.") String ticket){
|
||||
if (this.userService.adminExists()){
|
||||
return new ResponseEntity<>("Admin had been already created.", HttpStatus.FORBIDDEN);
|
||||
}
|
||||
|
Reference in New Issue
Block a user