mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-12 20:23:52 +08:00
更新2.1.1版本,优化代码提示
This commit is contained in:
@@ -18,9 +18,11 @@ import (
|
||||
)
|
||||
|
||||
func Admin(ctx context.Context, group *ghttp.RouterGroup) {
|
||||
// 兼容后台登录入口
|
||||
group.ALL("/login", func(r *ghttp.Request) {
|
||||
r.Response.RedirectTo("/admin")
|
||||
})
|
||||
|
||||
prefix := g.Cfg().MustGet(ctx, "router.admin.prefix", "/admin")
|
||||
group.Group(prefix.String(), func(group *ghttp.RouterGroup) {
|
||||
group.Middleware(service.Middleware().AdminAuth)
|
||||
|
||||
Reference in New Issue
Block a user