Refine the directories.
This commit is contained in:
@ -6,6 +6,7 @@ import (
|
||||
"regexp"
|
||||
"strconv"
|
||||
"tank/rest/result"
|
||||
"tank/rest/tool"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -129,7 +130,7 @@ func (this *AlienController) CheckRequestUser(writer http.ResponseWriter, reques
|
||||
if user == nil {
|
||||
panic(`邮箱或密码错误`)
|
||||
} else {
|
||||
if !MatchBcrypt(password, user.Password) {
|
||||
if !tool.MatchBcrypt(password, user.Password) {
|
||||
panic(`邮箱或密码错误`)
|
||||
}
|
||||
}
|
||||
@ -209,7 +210,7 @@ func (this *AlienController) FetchUploadToken(writer http.ResponseWriter, reques
|
||||
Filename: filename,
|
||||
Privacy: privacy,
|
||||
Size: size,
|
||||
Ip: GetIpAddress(request),
|
||||
Ip: tool.GetIpAddress(request),
|
||||
}
|
||||
|
||||
uploadToken = this.uploadTokenDao.Create(uploadToken)
|
||||
@ -402,7 +403,7 @@ func (this *AlienController) FetchDownloadToken(writer http.ResponseWriter, requ
|
||||
UserUuid: user.Uuid,
|
||||
MatterUuid: matterUuid,
|
||||
ExpireTime: time.Now().Add(mm),
|
||||
Ip: GetIpAddress(request),
|
||||
Ip: tool.GetIpAddress(request),
|
||||
}
|
||||
|
||||
downloadToken = this.downloadTokenDao.Create(downloadToken)
|
||||
|
Reference in New Issue
Block a user