Refine the result things.

This commit is contained in:
zicla
2018-11-23 16:37:46 +08:00
parent f916e24bf4
commit b557e9717a
8 changed files with 103 additions and 139 deletions

View File

@ -417,7 +417,7 @@ func (this *AlienController) Download(writer http.ResponseWriter, request *http.
tokenUser := this.userDao.CheckByUuid(downloadToken.UserUuid)
if matter.UserUuid != tokenUser.Uuid {
panic(RESULT_CODE_UNAUTHORIZED)
panic(CODE_WRAPPER_UNAUTHORIZED)
}
//下载之后立即过期掉。
@ -429,7 +429,7 @@ func (this *AlienController) Download(writer http.ResponseWriter, request *http.
//判断文件的所属人是否正确
user := this.checkUser(writer, request)
if user.Role != USER_ROLE_ADMINISTRATOR && matter.UserUuid != user.Uuid {
panic(RESULT_CODE_UNAUTHORIZED)
panic(CODE_WRAPPER_UNAUTHORIZED)
}
}