mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 04:30:05 +00:00
🔖 [dashboard 0.9.17] 404 页面
This commit is contained in:
@@ -22,7 +22,7 @@ type AuthorizeOption struct {
|
||||
|
||||
func Authorize(opt AuthorizeOption) func(*gin.Context) {
|
||||
return func(c *gin.Context) {
|
||||
var code uint64 = http.StatusForbidden
|
||||
var code = http.StatusForbidden
|
||||
if opt.Guest {
|
||||
code = http.StatusBadRequest
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
type ErrInfo struct {
|
||||
Code uint64
|
||||
Code int
|
||||
Title string
|
||||
Msg string
|
||||
Link string
|
||||
@@ -18,7 +18,7 @@ type ErrInfo struct {
|
||||
|
||||
func ShowErrorPage(c *gin.Context, i ErrInfo, isPage bool) {
|
||||
if isPage {
|
||||
c.HTML(http.StatusOK, "dashboard/error", CommonEnvironment(c, gin.H{
|
||||
c.HTML(i.Code, "dashboard/error", CommonEnvironment(c, gin.H{
|
||||
"Code": i.Code,
|
||||
"Title": i.Title,
|
||||
"Msg": i.Msg,
|
||||
|
||||
Reference in New Issue
Block a user