fix review

This commit is contained in:
icefed
2023-02-06 20:30:20 +08:00
committed by nkanaev
parent 66f2a973a3
commit 7cf27e0fde
5 changed files with 103 additions and 73 deletions

View File

@@ -31,10 +31,10 @@ func (s *Server) handler() http.Handler {
if s.Username != "" && s.Password != "" {
a := &auth.Middleware{
BasePath: s.BasePath,
Username: s.Username,
Password: s.Password,
SkipAuthPaths: []string{"/static", "/fever"},
BasePath: s.BasePath,
Username: s.Username,
Password: s.Password,
Public: []string{"/static", "/fever"},
}
r.Use(a.Handler)
}
@@ -365,7 +365,7 @@ func (s *Server) handleItemList(c *router.Context) {
}
newestFirst := query.Get("oldest_first") != "true"
items := s.db.ListItems(filter, perPage+1, newestFirst)
items := s.db.ListItems(filter, perPage+1, newestFirst, false)
hasMore := false
if len(items) == perPage+1 {
hasMore = true