|
|
@ -3,7 +3,6 @@ package helper |
|
|
|
import ( |
|
|
|
"encoding/json" |
|
|
|
"git.tetele.net/tgo/conf" |
|
|
|
"git.tetele.net/tgo/helper" |
|
|
|
"git.tetele.net/tgo/site" |
|
|
|
"git.tetele.net/tgo/userrpc" |
|
|
|
"io/ioutil" |
|
|
@ -32,7 +31,7 @@ func (controller *BaseController)Construct(w http.ResponseWriter, req *http.Requ |
|
|
|
|
|
|
|
var replyJson []byte |
|
|
|
|
|
|
|
helper.SetHeader(w, req) |
|
|
|
SetHeader(w, req) |
|
|
|
|
|
|
|
if strings.ToUpper(req.Method) == "OPTIONS" { |
|
|
|
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.Domain = helper.GetDomain(req) |
|
|
|
controller.Domain = GetDomain(req) |
|
|
|
|
|
|
|
//获取json数据
|
|
|
|
body, _ := ioutil.ReadAll(req.Body) |
|
|
|