fix: show item shares from all users to admins (#5941)

This commit is contained in:
mehmet turac authored and GitHub committed 2026-05-17 15:01:02 +02:00
1 parent e38c28273a
commit 9cc18a81e3
3 files changed
+111 -1

No files matched your search

+17
View File
@@ -110,6 +110,23 @@ func (s *Storage) Gets(path string, id uint) ([]*Link, error) {
return links, nil
}
// GetsByPath returns all non-expired links for a path.
func (s *Storage) GetsByPath(path string) ([]*Link, error) {
links, err := s.All()
if err != nil {
return nil, err
}
filtered := make([]*Link, 0, len(links))
for _, link := range links {
if link.Path == path {
filtered = append(filtered, link)
}
}
return filtered, nil
}
// Save wraps a StorageBackend.Save
func (s *Storage) Save(l *Link) error {
return s.back.Save(l)