update sync
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package httpserver
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"net/http"
|
||||
@@ -172,6 +173,9 @@ func (s *Server) syncAccessFilters(r *http.Request) (sync.FileAccessFunc, sync.P
|
||||
}
|
||||
record, err := s.repository.GetDocumentByPath(r.Context(), file.Path)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return s.canReadNewDocument(r, file.Path)
|
||||
}
|
||||
accessErr = err
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user