Skip to content

Commit

Permalink
Update third party (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aiee authored Apr 23, 2021
1 parent f60f6cf commit e3ac49e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
12 changes: 6 additions & 6 deletions controllers/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ type Request struct {
Username string `json:"username"`
Password string `json:"password"`
Address string `json:"address"`
Port int `json:"port"`
Port int `json:"port"`
}

type ExecuteRequest struct {
Gql string `json:"gql"`
Gql string `json:"gql"`
}

type Data map[string]interface{}
Expand All @@ -41,10 +41,10 @@ func (this *DatabaseController) Connect() {
m := make(map[string]common.Any)
m["nsid"] = nsid
res.Data = nsid
this.Ctx.SetCookie("Secure","true")
this.Ctx.SetCookie("SameSite","None")
this.Ctx.SetCookie("Secure", "true")
this.Ctx.SetCookie("SameSite", "None")
this.SetSession("nsid", nsid)

res.Message = "Login successfully"
} else {
res.Code = -1
Expand All @@ -54,7 +54,7 @@ func (this *DatabaseController) Connect() {
this.ServeJSON()
}

func (this *DatabaseController) Home(){
func (this *DatabaseController) Home() {
var res Response
res.Code = 0
this.ServeJSON()
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ go 1.13
require (
github.com/astaxie/beego v1.12.3
github.com/elazarl/go-bindata-assetfs v1.0.1 // indirect
github.com/facebook/fbthrift v0.0.0-20190922225929-2f9839604e25 // indirect
github.com/facebook/fbthrift v0.31.1-0.20210223140454-614a73a42488
github.com/google/go-cmp v0.5.4 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/prometheus/client_golang v1.9.0 // indirect
github.com/satori/go.uuid v1.2.0
github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 // indirect
github.com/stretchr/testify v1.7.0 // indirect
github.com/vesoft-inc/nebula-go v0.0.0-20210322063004-e37085b865d6
github.com/vesoft-inc/nebula-go v1.1.1-0.20210416024212-052593cefbb9
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect
golang.org/x/net v0.0.0-20201224014010-6772e930b67b // indirect
golang.org/x/sys v0.0.0-20210105210732-16f7687f5001 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/facebook/fbthrift v0.0.0-20190922225929-2f9839604e25 h1:dezRDs9oGYxeavyvcNg/Js+dK6kIvfzERoJ7K8Xkv14=
github.com/facebook/fbthrift v0.0.0-20190922225929-2f9839604e25/go.mod h1:2tncLx5rmw69e5kMBv/yJneERbzrr1yr5fdlnTbu8lU=
github.com/facebook/fbthrift v0.31.1-0.20210223140454-614a73a42488 h1:A4KCT0mvTBkvb93gGN+efLPkrgTqmqMeaLDG51KVhMM=
github.com/facebook/fbthrift v0.31.1-0.20210223140454-614a73a42488/go.mod h1:2tncLx5rmw69e5kMBv/yJneERbzrr1yr5fdlnTbu8lU=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
Expand Down Expand Up @@ -330,6 +332,8 @@ github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijb
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/vesoft-inc/nebula-go v0.0.0-20210322063004-e37085b865d6 h1:qdKi4VNi8DzD/gAAEHztqJr2KDpcQfkEhP1liIMRRm8=
github.com/vesoft-inc/nebula-go v0.0.0-20210322063004-e37085b865d6/go.mod h1:wxhWNoVVP0+TLETNwaIa93H9tOECxlEv4XH+/do22Qk=
github.com/vesoft-inc/nebula-go v1.1.1-0.20210416024212-052593cefbb9 h1:BcqoJC+roj1EHwHNrg7ds23VZ4nVK9FzYEZVJLl+pvQ=
github.com/vesoft-inc/nebula-go v1.1.1-0.20210416024212-052593cefbb9/go.mod h1:UOCePSb9RuaLIYSUgURxkRp/9wEWuyB8uqS954tJJYA=
github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU=
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

func main() {
beego.BConfig.WebConfig.Session.SessionCookieLifeTime = 0
beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 60 * 60 * 24
beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 60 * 60 * 24
beego.BConfig.WebConfig.Session.SessionName = "nsid"
beego.BConfig.WebConfig.Session.SessionOn = true
beego.Run()
Expand Down

0 comments on commit e3ac49e

Please sign in to comment.