feature: move docs
This commit is contained in:
@@ -171,7 +171,7 @@ func (s *Server) syncAccessFilters(r *http.Request) (sync.FileAccessFunc, sync.P
|
||||
if accessErr != nil {
|
||||
return false
|
||||
}
|
||||
record, err := s.repository.GetDocumentByPath(r.Context(), file.Path)
|
||||
record, err := s.repository.GetDocumentByPathOrAlias(r.Context(), file.Path)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return s.canReadNewDocument(r, file.Path)
|
||||
@@ -190,7 +190,7 @@ func (s *Server) syncAccessFilters(r *http.Request) (sync.FileAccessFunc, sync.P
|
||||
if accessErr != nil {
|
||||
return false
|
||||
}
|
||||
record, err := s.repository.GetDocumentByPath(r.Context(), path)
|
||||
record, err := s.repository.GetDocumentByPathOrAlias(r.Context(), path)
|
||||
if err == nil && record != nil {
|
||||
ok, err := s.canWriteDocumentRecord(r, *record)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user