Browse Source

减少引用

master
listen 3 years ago
parent
commit
394f73627d
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      base.go

+ 2
- 3
base.go View File

@ -3,7 +3,6 @@ package helper
import ( import (
"encoding/json" "encoding/json"
"git.tetele.net/tgo/conf" "git.tetele.net/tgo/conf"
"git.tetele.net/tgo/helper"
"git.tetele.net/tgo/site" "git.tetele.net/tgo/site"
"git.tetele.net/tgo/userrpc" "git.tetele.net/tgo/userrpc"
"io/ioutil" "io/ioutil"
@ -32,7 +31,7 @@ func (controller *BaseController)Construct(w http.ResponseWriter, req *http.Requ
var replyJson []byte var replyJson []byte
helper.SetHeader(w, req)
SetHeader(w, req)
if strings.ToUpper(req.Method) == "OPTIONS" { if strings.ToUpper(req.Method) == "OPTIONS" {
replyJson, _ = json.Marshal(1) replyJson, _ = json.Marshal(1)
@ -57,7 +56,7 @@ func (controller *BaseController)Construct(w http.ResponseWriter, req *http.Requ
controller.UserInfo, err = userrpc.GetUserByToken(controller.SiteInfo["database"], controller.Token, conf.USER_RPC_URL) controller.UserInfo, err = userrpc.GetUserByToken(controller.SiteInfo["database"], controller.Token, conf.USER_RPC_URL)
} }
controller.Domain = helper.GetDomain(req)
controller.Domain = GetDomain(req)
//获取json数据 //获取json数据
body, _ := ioutil.ReadAll(req.Body) body, _ := ioutil.ReadAll(req.Body)


Loading…
Cancel
Save