del: 移除旧代码假系统数据库备份
This commit is contained in:
@@ -329,7 +329,7 @@ func uploadSizeLimit(buf *bytes.Buffer, part *multipart.Part, maxLimit int64, li
|
||||
}
|
||||
maxLimit -= n
|
||||
if maxLimit < 0 {
|
||||
return fmt.Errorf(limitError)
|
||||
return fmt.Errorf("%s", limitError)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -16,11 +16,11 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"be.ems/lib/config"
|
||||
"be.ems/lib/dborm"
|
||||
"be.ems/lib/global"
|
||||
"be.ems/lib/log"
|
||||
"be.ems/lib/oauth"
|
||||
"be.ems/restagent/config"
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
@@ -560,23 +560,10 @@ func CheckExtValidRequest(w http.ResponseWriter, r *http.Request) (string, error
|
||||
return token, nil
|
||||
}
|
||||
|
||||
func ResponseStatusOK200Login(w http.ResponseWriter, token string, user *dborm.User) {
|
||||
func ResponseStatusOK200Login(w http.ResponseWriter, token string) {
|
||||
var oAuthResponse SucceedOAuthResponse
|
||||
oAuthResponse.AccessToken = token
|
||||
oAuthResponse.Expires = strconv.Itoa((int)(config.GetExpiresFromConfig()))
|
||||
oAuthResponse.ChangePasswordFlag = user.ChangePasswordFlag
|
||||
oAuthResponse.GroupName = user.GroupName
|
||||
ResponseWithJson(w, http.StatusOK, oAuthResponse)
|
||||
}
|
||||
|
||||
func ResponseStatusOK200LoginWhitRP(w http.ResponseWriter, token string, user *dborm.User, roles, perms []string) {
|
||||
var oAuthResponse SucceedOAuthResponse
|
||||
oAuthResponse.AccessToken = token
|
||||
oAuthResponse.Expires = strconv.Itoa((int)(config.GetExpiresFromConfig()))
|
||||
oAuthResponse.ChangePasswordFlag = user.ChangePasswordFlag
|
||||
oAuthResponse.GroupName = user.GroupName
|
||||
oAuthResponse.Roles = roles
|
||||
oAuthResponse.Perms = perms
|
||||
ResponseWithJson(w, http.StatusOK, oAuthResponse)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user