package routers import ( "Medical_ERP/controllers" beego "github.com/beego/beego/v2/server/web" ) func init() { medicine := beego.NewNamespace("/api/medicine-img", beego.NSRouter("/list", &controllers.MedicineImgController{}, "*:List"), beego.NSRouter("/edit", &controllers.MedicineImgController{}, "*:Edit"), ) //注册 namespace beego.AddNamespace(medicine) }