作者 tangxvhui

调整路由

1 package routers 1 package routers
  2 +
  3 +import (
  4 + "github.com/beego/beego/v2/server/web"
  5 + "github.com/linmadan/egglib-go/web/beego/filters"
  6 + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/port/beego/controllers"
  7 + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/port/beego/middlewares"
  8 +)
  9 +
  10 +func init() {
  11 + ns := web.NewNamespace("/v1/message-personal",
  12 + web.NSBefore(filters.AllowCors(), middlewares.CheckFontToken()),
  13 + web.NSCtrlGet("/summary-evaluation/self/today", (*controllers.MessagePersonalController).TodayMessageSummaryEvaluation),
  14 + )
  15 + web.AddNamespace(ns)
  16 +}