mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Small refactoring of modules/private (#15947)
* Use correct variable name. * doer is never nil here. * Use status code constants. * Replaced generic map with concrete struct. * Fixed windows lint. * Removed unused method. * Changed error codes. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
@@ -11,12 +11,13 @@ import (
|
||||
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/graceful"
|
||||
"code.gitea.io/gitea/modules/private"
|
||||
)
|
||||
|
||||
// Restart is not implemented for Windows based servers as they can't fork
|
||||
func Restart(ctx *context.PrivateContext) {
|
||||
ctx.JSON(http.StatusNotImplemented, map[string]interface{}{
|
||||
"err": "windows servers cannot be gracefully restarted - shutdown and restart manually",
|
||||
ctx.JSON(http.StatusNotImplemented, private.Response{
|
||||
Err: "windows servers cannot be gracefully restarted - shutdown and restart manually",
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user