Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vesoft-inc/nebula-studio
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9758ae4a8888acc6429989ac585f6b3a4487dd1e
Choose a base ref
..
head repository: vesoft-inc/nebula-studio
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 81b20a0654590c798348c466af99f8aac5a10584
Choose a head ref
Showing with 5 additions and 6 deletions.
  1. +5 −4 server-v2/api/studio/internal/service/gateway.go
  2. +0 −2 server-v2/api/studio/pkg/base/types.go
9 changes: 5 additions & 4 deletions server-v2/api/studio/internal/service/gateway.go
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ import (
"github.com/vesoft-inc/nebula-http-gateway/ccore/nebula/gateway/dao"
"github.com/vesoft-inc/nebula-studio/server/api/studio/internal/svc"
"github.com/vesoft-inc/nebula-studio/server/api/studio/internal/types"
"github.com/vesoft-inc/nebula-studio/server/api/studio/pkg/base"
"github.com/vesoft-inc/nebula-studio/server/api/studio/pkg/ecode"

"github.com/zeromicro/go-zero/core/logx"
@@ -71,9 +72,9 @@ func (s *gatewayService) BatchExecNGQL(request *types.BatchExecNGQLParams) (*typ
gqlRes["gql"] = gql
if err != nil {
gqlRes["message"] = err.Error()
gqlRes["code"] = -1
gqlRes["code"] = base.Error
} else {
gqlRes["code"] = 0
gqlRes["code"] = base.Success
}
gqlRes["data"] = execute
data = append(data, gqlRes)
@@ -85,9 +86,9 @@ func (s *gatewayService) BatchExecNGQL(request *types.BatchExecNGQLParams) (*typ
gqlRes["gql"] = strings.Join(paramList, "; ")
if err != nil {
gqlRes["message"] = err.Error()
gqlRes["code"] = -1
gqlRes["code"] = base.Error
} else {
gqlRes["code"] = 0
gqlRes["code"] = base.Success
}
gqlRes["data"] = execute
data = append(data, gqlRes)
2 changes: 0 additions & 2 deletions server-v2/api/studio/pkg/base/types.go
Original file line number Diff line number Diff line change
@@ -7,6 +7,4 @@ type Result interface{}
const (
Error StatusCode = -1
Success StatusCode = 0
// TODO: need to del it
AuthorizationError StatusCode = 401
)