mirror of
https://github.com/get-drexa/drive.git
synced 2026-02-02 08:51:16 +00:00
feat(backend): includesExpired for file/dir shares
add includesExpired query param for file/dir shares query
This commit is contained in:
@@ -779,8 +779,11 @@ func decodeListChildrenCursor(s string) (*decodedListChildrenCursor, error) {
|
||||
func (h *HTTPHandler) listDirectoryShares(c *fiber.Ctx) error {
|
||||
node := mustCurrentDirectoryNode(c)
|
||||
|
||||
includesExpired := c.Query("includesExpired") == "true"
|
||||
|
||||
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 {
|
||||
return httperr.Internal(err)
|
||||
|
||||
@@ -362,8 +362,11 @@ func (h *HTTPHandler) deleteFiles(c *fiber.Ctx) error {
|
||||
func (h *HTTPHandler) listFileShares(c *fiber.Ctx) error {
|
||||
node := mustCurrentFileNode(c)
|
||||
|
||||
includesExpired := c.Query("includesExpired") == "true"
|
||||
|
||||
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 {
|
||||
return httperr.Internal(err)
|
||||
|
||||
Reference in New Issue
Block a user