Refine the directories.

This commit is contained in:
zicla
2019-04-26 02:30:04 +08:00
parent 61b14fe82b
commit b3c52ea50e
40 changed files with 214 additions and 162 deletions

View File

@ -3,6 +3,8 @@ package rest
import (
"encoding/json"
"net/http"
"tank/rest/config"
"tank/rest/tool"
"time"
)
@ -63,7 +65,7 @@ func (this *FootprintService) Trace(writer http.ResponseWriter, request *http.Re
//将文件信息存入数据库中。
footprint := &Footprint{
Ip: GetIpAddress(request),
Ip: tool.GetIpAddress(request),
Host: request.Host,
Uri: request.URL.Path,
Params: paramsString,
@ -72,7 +74,7 @@ func (this *FootprintService) Trace(writer http.ResponseWriter, request *http.Re
}
//有可能DB尚且没有配置 直接打印出内容,并且退出
if CONFIG.Installed {
if config.CONFIG.Installed {
user := this.findUser(writer, request)
userUuid := ""
if user != nil {