Link shares to the user, not the collective

The user is required when searching because of folders (sadly), so the
share is connected to the user.
This commit is contained in:
eikek
2021-10-23 23:29:36 +02:00
parent 9009ebcb39
commit 2ac0b84e52
17 changed files with 268 additions and 110 deletions

View File

@ -2228,10 +2228,19 @@ disableOtp flags otp receive =
--- Share
getShares : Flags -> (Result Http.Error ShareList -> msg) -> Cmd msg
getShares flags receive =
getShares : Flags -> String -> Bool -> (Result Http.Error ShareList -> msg) -> Cmd msg
getShares flags query owning receive =
Http2.authGet
{ url = flags.config.baseUrl ++ "/api/v1/sec/share"
{ url =
flags.config.baseUrl
++ "/api/v1/sec/share?q="
++ Url.percentEncode query
++ (if owning then
"&owning"
else
""
)
, account = getAccount flags
, expect = Http.expectJson receive Api.Model.ShareList.decoder
}