24
24
*
25
25
* @author johnniang
26
26
* @author ryanwang
27
- * @date 3/19/ 19
27
+ * @date 2019-03- 19
28
28
*/
29
29
@ Slf4j
30
30
@ RestController
@@ -41,7 +41,7 @@ public AdminController(AdminService adminService, OptionService optionService) {
41
41
}
42
42
43
43
@ GetMapping (value = "/is_installed" )
44
- @ ApiOperation ("Check install status" )
44
+ @ ApiOperation ("Checks Installation status" )
45
45
public boolean isInstall () {
46
46
return optionService .getByPropertyOrDefault (PrimaryProperties .IS_INSTALLED , Boolean .class , false );
47
47
}
@@ -61,13 +61,13 @@ public void logout() {
61
61
}
62
62
63
63
@ PostMapping ("password/code" )
64
- @ ApiOperation ("Send reset password verify code. " )
64
+ @ ApiOperation ("Sends reset password verify code" )
65
65
public void sendResetCode (@ RequestBody @ Valid ResetPasswordParam param ) {
66
66
adminService .sendResetPasswordCode (param );
67
67
}
68
68
69
69
@ PutMapping ("password/reset" )
70
- @ ApiOperation ("Reset password by verify code. " )
70
+ @ ApiOperation ("Resets password by verify code" )
71
71
public void resetPassword (@ RequestBody @ Valid ResetPasswordParam param ) {
72
72
adminService .resetPasswordByCode (param );
73
73
}
@@ -79,11 +79,6 @@ public AuthToken refresh(@PathVariable("refreshToken") String refreshToken) {
79
79
return adminService .refreshToken (refreshToken );
80
80
}
81
81
82
- /**
83
- * Get some statistics about the count of posts, the count of comments, etc.
84
- *
85
- * @return counts
86
- */
87
82
@ GetMapping ("counts" )
88
83
@ ApiOperation ("Gets count info" )
89
84
@ Deprecated
@@ -104,31 +99,31 @@ public void updateAdmin() {
104
99
}
105
100
106
101
@ GetMapping ("spring/application.yaml" )
107
- @ ApiOperation ("Get application config content" )
102
+ @ ApiOperation ("Gets application config content" )
108
103
public BaseResponse <String > getSpringApplicationConfig () {
109
104
return BaseResponse .ok (HttpStatus .OK .getReasonPhrase (), adminService .getApplicationConfig ());
110
105
}
111
106
112
- @ PutMapping ("spring/application.yaml/update " )
113
- @ ApiOperation ("Update application config content" )
107
+ @ PutMapping ("spring/application.yaml" )
108
+ @ ApiOperation ("Updates application config content" )
114
109
public void updateSpringApplicationConfig (@ RequestParam (name = "content" ) String content ) {
115
110
adminService .updateApplicationConfig (content );
116
111
}
117
112
118
113
@ PostMapping (value = {"halo/restart" , "spring/restart" })
119
- @ ApiOperation ("Restart halo server" )
114
+ @ ApiOperation ("Restarts halo server" )
120
115
public void restartApplication () {
121
116
Application .restart ();
122
117
}
123
118
124
119
@ GetMapping (value = "halo/logfile" )
125
- @ ApiOperation ("Get halo log file content. " )
120
+ @ ApiOperation ("Gets halo log file content" )
126
121
public BaseResponse <String > getLogFiles (@ RequestParam ("lines" ) Long lines ) {
127
122
return BaseResponse .ok (HttpStatus .OK .getReasonPhrase (), adminService .getLogFiles (lines ));
128
123
}
129
124
130
125
@ GetMapping (value = "halo/logfile/download" )
131
- @ ApiOperation ("Download halo log file. " )
126
+ @ ApiOperation ("Downloads halo log file" )
132
127
public void downloadLogFiles (@ RequestParam ("lines" ) Long lines , HttpServletResponse response ) {
133
128
adminService .downloadLogFiles (lines , response );
134
129
}
0 commit comments