mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-28 11:32:49 +09:00
[refactor] replace int with httpStatusCodes (#15282)
* replace "200" (int) with "http.StatusOK" (const) * ctx.Error & ctx.HTML * ctx.JSON Part1 * ctx.JSON Part2 * ctx.JSON Part3
This commit is contained in:
@ -5,6 +5,8 @@
|
||||
package dev
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/modules/base"
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
@ -23,5 +25,5 @@ func TemplatePreview(ctx *context.Context) {
|
||||
ctx.Data["ResetPwdCodeLives"] = timeutil.MinutesToFriendly(setting.Service.ResetPwdCodeLives, ctx.Locale.Language())
|
||||
ctx.Data["CurDbValue"] = ""
|
||||
|
||||
ctx.HTML(200, base.TplName(ctx.Params("*")))
|
||||
ctx.HTML(http.StatusOK, base.TplName(ctx.Params("*")))
|
||||
}
|
||||
|
Reference in New Issue
Block a user