作者 yangfu

fix: row edit not work

1 package service 1 package service
2 2
3 import ( 3 import (
4 - "fmt"  
5 "github.com/linmadan/egglib-go/core/application" 4 "github.com/linmadan/egglib-go/core/application"
6 "gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/application/factory" 5 "gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/application/factory"
7 "gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/application/table/command" 6 "gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/application/table/command"
@@ -12,7 +11,6 @@ import ( @@ -12,7 +11,6 @@ import (
12 ) 11 )
13 12
14 func (tableService *TableService) TablePreview(ctx *domain.Context, cmd *command.TablePreviewCommand) (interface{}, error) { 13 func (tableService *TableService) TablePreview(ctx *domain.Context, cmd *command.TablePreviewCommand) (interface{}, error) {
15 - return nil, factory.FastError(fmt.Errorf("Backend not found. Check if any backend is down or not"))  
16 if cmd.TableId == 0 { 14 if cmd.TableId == 0 {
17 return &dto.TablePreviewDto{}, nil 15 return &dto.TablePreviewDto{}, nil
18 } 16 }
@@ -7,7 +7,7 @@ import ( @@ -7,7 +7,7 @@ import (
7 7
8 func init() { 8 func init() {
9 tableController := &controllers.TableController{} 9 tableController := &controllers.TableController{}
10 - //tableController.BaseController.ErrorResolver, _ = controllers.NewCommErrorResolver() 10 + tableController.BaseController.ErrorResolver, _ = controllers.NewCommErrorResolver()
11 web.Router("/data/tables/", tableController, "Post:CreateTable") 11 web.Router("/data/tables/", tableController, "Post:CreateTable")
12 //web.Router("/data/tables/:tableId", tableController, "Put:UpdateTable") 12 //web.Router("/data/tables/:tableId", tableController, "Put:UpdateTable")
13 web.Router("/data/tables/:tableId", tableController, "Get:GetTable") 13 web.Router("/data/tables/:tableId", tableController, "Get:GetTable")