del: 移除旧代码假系统数据库备份

This commit is contained in:
TsMask
2025-01-07 11:13:18 +08:00
parent b7d0711084
commit 33dc2fa599
4 changed files with 10 additions and 203 deletions

View File

@@ -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)
}