Added javadocs

Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
Marcin Woźniak 2020-12-23 14:26:29 +01:00
parent 507d9fddc0
commit 2ec3699978
Signed by: y0rune
GPG Key ID: F204C385F57EB348

View File

@ -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()){ if (this.userService.adminExists()){
return new ResponseEntity<>("Admin had been already created.", HttpStatus.FORBIDDEN); return new ResponseEntity<>("Admin had been already created.", HttpStatus.FORBIDDEN);
} }