mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 10:28:27 +00:00
Add route to get settings for a share
Returns the client settings of the creator.
This commit is contained in:
@ -48,6 +48,8 @@ trait OShare[F[_]] {
|
||||
|
||||
// ---
|
||||
|
||||
def findActiveById(id: Ident): OptionT[F, ShareData]
|
||||
|
||||
/** Verifies the given id and password and returns a authorization token on success. */
|
||||
def verify(key: ByteVector)(id: Ident, password: Option[Password]): F[VerifyResult]
|
||||
|
||||
@ -277,6 +279,9 @@ object OShare {
|
||||
VerifyResult.invalidToken.pure[F]
|
||||
}
|
||||
|
||||
def findActiveById(id: Ident): OptionT[F, ShareData] =
|
||||
RShare.findCurrentActive(id).mapK(store.transform).map(ShareData.tupled)
|
||||
|
||||
def findShareQuery(id: Ident): OptionT[F, ShareQuery] =
|
||||
RShare
|
||||
.findCurrentActive(id)
|
||||
|
Reference in New Issue
Block a user