mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 09:52:26 +02:00
Refactor HTTP request context (#17979)
This commit is contained in:
parent
9d943bf374
commit
4da1d97810
26 changed files with 139 additions and 177 deletions
|
@ -17,12 +17,12 @@ import (
|
|||
// Restart causes the server to perform a graceful restart
|
||||
func Restart(ctx *context.PrivateContext) {
|
||||
graceful.GetManager().DoGracefulRestart()
|
||||
ctx.PlainText(http.StatusOK, []byte("success"))
|
||||
ctx.PlainText(http.StatusOK, "success")
|
||||
|
||||
}
|
||||
|
||||
// Shutdown causes the server to perform a graceful shutdown
|
||||
func Shutdown(ctx *context.PrivateContext) {
|
||||
graceful.GetManager().DoGracefulShutdown()
|
||||
ctx.PlainText(http.StatusOK, []byte("success"))
|
||||
ctx.PlainText(http.StatusOK, "success")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue