feat(backend): includesExpired for file/dir shares

add includesExpired query param for file/dir shares query
This commit is contained in:
2025-12-28 22:12:55 +00:00
parent 0e8c616489
commit 19a870a4e7
2 changed files with 8 additions and 2 deletions

View File

@@ -779,8 +779,11 @@ func decodeListChildrenCursor(s string) (*decodedListChildrenCursor, error) {
func (h *HTTPHandler) listDirectoryShares(c *fiber.Ctx) error { func (h *HTTPHandler) listDirectoryShares(c *fiber.Ctx) error {
node := mustCurrentDirectoryNode(c) node := mustCurrentDirectoryNode(c)
includesExpired := c.Query("includesExpired") == "true"
shares, err := h.sharingService.ListShares(c.Context(), h.db, node.AccountID, sharing.ListSharesOptions{ shares, err := h.sharingService.ListShares(c.Context(), h.db, node.AccountID, sharing.ListSharesOptions{
Items: []*virtualfs.Node{node}, Items: []*virtualfs.Node{node},
IncludesExpired: includesExpired,
}) })
if err != nil { if err != nil {
return httperr.Internal(err) return httperr.Internal(err)

View File

@@ -362,8 +362,11 @@ func (h *HTTPHandler) deleteFiles(c *fiber.Ctx) error {
func (h *HTTPHandler) listFileShares(c *fiber.Ctx) error { func (h *HTTPHandler) listFileShares(c *fiber.Ctx) error {
node := mustCurrentFileNode(c) node := mustCurrentFileNode(c)
includesExpired := c.Query("includesExpired") == "true"
shares, err := h.sharingService.ListShares(c.Context(), h.db, node.AccountID, sharing.ListSharesOptions{ shares, err := h.sharingService.ListShares(c.Context(), h.db, node.AccountID, sharing.ListSharesOptions{
Items: []*virtualfs.Node{node}, Items: []*virtualfs.Node{node},
IncludesExpired: includesExpired,
}) })
if err != nil { if err != nil {
return httperr.Internal(err) return httperr.Internal(err)