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
@@ -87,7 +87,7 @@ func (s *Server) UpdateRules() error {
db := database.DB.Model(new(Rule))
defer s.rulesLock.Unlock()
s.rulesLock.Lock()
return db.Order("rank desc").Find(&s.rules).Error
return db.Order("`rank` desc").Find(&s.rules).Error
}
func (s *Server) startHttpServer() {