houyaf vor 3 Jahren
Ursprung
Commit
33ed36b078
2 geänderte Dateien mit 10 neuen und 2 gelöschten Zeilen
  1. 0 1
      web/controllers/task_cat_controller.go
  2. 10 1
      web/router/routes.go

+ 0 - 1
web/controllers/task_cat_controller.go

@@ -42,7 +42,6 @@ func (c *TaskCatController) GetPage() *JsonResult {
 
 func (c *TaskCatController) GetById(taskCatId int64) *JsonResult {
 	ocId      := c.GetCurOcId()
-	
 	data, err := c.Service.GetById(ocId, taskCatId)
 	if err != nil {
 		return ResultErr(err.Error(), nil)

+ 10 - 1
web/router/routes.go

@@ -94,6 +94,7 @@ func Configure(b *bootstrap.Bootstrapper) {
 	appParty := b.Party("/app", crs).AllowMethods(iris.MethodOptions)
 	{
 		appParty.Use(middleware.AuthToken)
+		
 		appService := service.NewAppService()
 		appApp := mvc.New(appParty.Party(""))
 		appApp.Register(appService)
@@ -114,6 +115,7 @@ func Configure(b *bootstrap.Bootstrapper) {
 	taskParty := b.Party("/task", crs).AllowMethods(iris.MethodOptions)
 	{
 		taskParty.Use(middleware.AuthToken)
+		
 		taskService := service.NewTaskService()
 		taskApp := mvc.New(taskParty.Party(""))
 		taskApp.Register(taskService)
@@ -129,13 +131,14 @@ func Configure(b *bootstrap.Bootstrapper) {
 	msgParty := b.Party("/msg", crs).AllowMethods(iris.MethodOptions)
 	{
 		msgParty.Use(middleware.AuthToken)
+		
 		msgService := service.NewMsgService()
 		msgApp := mvc.New(msgParty.Party(""))
 		msgApp.Register(msgService)
 		msgApp.Handle(new(controllers.MsgController))
 		
 		msgCatService := service.NewMsgCatService()
-		msgCatApp := mvc.New(taskParty.Party("/cat"))
+		msgCatApp := mvc.New(msgParty.Party("/cat"))
 		msgCatApp.Register(msgCatService)
 		msgCatApp.Handle(new(controllers.MsgCatController))
 	}
@@ -165,6 +168,7 @@ func Configure(b *bootstrap.Bootstrapper) {
 	modelParty := b.Party("/model", crs).AllowMethods(iris.MethodOptions)
 	{
 		modelParty.Use(middleware.AuthToken)
+		
 		modelService := service.NewModelService()
 		modelApp := mvc.New(modelParty.Party(""))
 		modelApp.Register(modelService)
@@ -190,6 +194,7 @@ func Configure(b *bootstrap.Bootstrapper) {
 	bizParty := b.Party("/biz", crs).AllowMethods(iris.MethodOptions)
 	{
 		bizParty.Use(middleware.AuthToken)
+		
 		bizService := service.NewBizService()
 		bizApp := mvc.New(bizParty.Party(""))
 		bizApp.Register(bizService)
@@ -240,6 +245,7 @@ func Configure(b *bootstrap.Bootstrapper) {
 	dbParty := b.Party("/db", crs).AllowMethods(iris.MethodOptions)
 	{
 		dbParty.Use(middleware.AuthToken)
+		
 		dbTypeService := service.NewDbTypeService()
 		dbTypeApp := mvc.New(dbParty.Party("/type"))
 		dbTypeApp.Register(dbTypeService)
@@ -255,6 +261,7 @@ func Configure(b *bootstrap.Bootstrapper) {
 	apiParty := b.Party("/api", crs).AllowMethods(iris.MethodOptions)
 	{
 		apiParty.Use(middleware.AuthToken)
+		
 		apiService := service.NewApiService()
 		apiApp := mvc.New(apiParty.Party(""))
 		apiApp.Register(apiService)
@@ -271,6 +278,7 @@ func Configure(b *bootstrap.Bootstrapper) {
 	artParty := b.Party("/art", crs).AllowMethods(iris.MethodOptions)
 	{
 		artParty.Use(middleware.AuthToken)
+		
 		artService := service.NewArtService()
 		artApp := mvc.New(artParty.Party(""))
 		artApp.Register(artService)
@@ -286,6 +294,7 @@ func Configure(b *bootstrap.Bootstrapper) {
 	docParty := b.Party("/doc", crs).AllowMethods(iris.MethodOptions)
 	{
 		docParty.Use(middleware.AuthToken)
+		
 		docCatService := service.NewDocCatService()
 		docCatApp := mvc.New(artParty.Party("/cat"))
 		docCatApp.Register(docCatService)