db.go文件冲突已解决

This commit is contained in:
孤鸿
2025-08-20 12:41:56 +08:00
12 changed files with 14268 additions and 10 deletions

View File

@@ -118,3 +118,9 @@ type StatsMem struct {
Percent float64 `json:"percent" xorm:"Float"`
CreatedAt time.Time `json:"created_at" xorm:"DateTime created index"`
}
type PasswordReset struct {
Token string `json:"token" xorm:"varchar(60) not null unique"`
UserId int `json:"id" xorm:"not null"`
ExpiresAt int `json:"expires_at" xorm:"not null"`
}

View File

@@ -75,8 +75,11 @@ func (auth AuthRadius) checkUser(name, pwd string, g *Group, ext map[string]inte
return fmt.Errorf("%s %s", name, "Radius set nasip 出现错误")
}
}
macAddr := ext["mac_addr"].(string)
base.Trace("AuthRadius", ext, macAddr)
macAddr := ""
if ext["mac_addr"] != nil {
macAddr = ext["mac_addr"].(string)
base.Trace("AuthRadius", ext, macAddr)
}
if macAddr != "" {
err = rfc2865.CallingStationID_AddString(packet, macAddr)
if err != nil {
@@ -94,5 +97,4 @@ func (auth AuthRadius) checkUser(name, pwd string, g *Group, ext map[string]inte
return fmt.Errorf("%s %s", name, "Radius用户名或密码错误")
}
return nil
}