fix(pkg): fix the conflict between rank field and built-in function (#38)

This commit is contained in:
tardc
2021-12-22 15:07:08 +08:00
committed by GitHub
parent 830dde3cec
commit a59540d42d
10 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ func (s *Server) UpdateRules() error {
db := database.DB.Model(new(Rule))
defer s.rulesLock.Unlock()
s.rulesLock.Lock()
return errors.Wrap(db.Order("rank desc").Find(&s.rules).Error, "FTP update rules error")
return errors.Wrap(db.Order("`rank` desc").Find(&s.rules).Error, "FTP update rules error")
}
func getClientPasvConnAddress(ip, port string) string {