🐛 Fix wrong determine of experience

This commit is contained in:
LittleSheep 2025-03-23 21:39:35 +08:00
parent 173ef92c01
commit 27e1196130

View File

@ -20,7 +20,7 @@ func JoinProgram(user models.Account, program models.Program) (models.ProgramMem
return member, fmt.Errorf("program member already exists")
}
var profile models.AccountProfile
if err := database.C.Where("account_id = ?", user.ID).Select("Experience").First(&profile).Error; err != nil {
if err := database.C.Where("account_id = ?", user.ID).Select("experience").First(&profile).Error; err != nil {
return member, err
}
if program.ExpRequirement < int64(profile.Experience) {