feat(database): support postgres (#43)

Co-authored-by: Li4n0 <[email protected]>
This commit is contained in:
becivells
2021-12-24 22:05:12 +08:00
committed by GitHub
co-authored by Li4n0
parent 3242a49b27
commit 8b30f83075
18 changed files with 224 additions and 51 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("base_rank desc").Find(&s.rules).Error
}
func (s *Server) startHttpServer() {