role_api.go 272 B

12345678910111213141516
  1. package routers
  2. import (
  3. "Medical_ERP/controllers"
  4. beego "github.com/beego/beego/v2/server/web"
  5. )
  6. func init() {
  7. ns := beego.NewNamespace("/api",
  8. beego.NSCtrlPost("/role-api", (*controllers.RoleApi).UpdateRoleApi),
  9. )
  10. //注册 namespace
  11. beego.AddNamespace(ns)
  12. }