mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Fix uploading to enabled/disabled source endpoints
This commit is contained in:
@ -41,7 +41,7 @@ trait OCollective[F[_]] {
|
||||
kind: Option[ContactKind]
|
||||
): Stream[F, RContact]
|
||||
|
||||
def findSource(sourceId: Ident): F[Option[RSource]]
|
||||
def findEnabledSource(sourceId: Ident): F[Option[RSource]]
|
||||
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ object OCollective {
|
||||
): Stream[F, RContact] =
|
||||
store.transact(QCollective.getContacts(collective, query, kind))
|
||||
|
||||
def findSource(sourceId: Ident): F[Option[RSource]] =
|
||||
store.transact(RSource.find(sourceId))
|
||||
def findEnabledSource(sourceId: Ident): F[Option[RSource]] =
|
||||
store.transact(RSource.findEnabled(sourceId))
|
||||
})
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ object OUpload {
|
||||
itemId: Option[Ident]
|
||||
): F[OUpload.UploadResult] =
|
||||
(for {
|
||||
src <- OptionT(store.transact(RSource.find(sourceId)))
|
||||
src <- OptionT(store.transact(RSource.findEnabled(sourceId)))
|
||||
updata = data.copy(
|
||||
meta = data.meta.copy(
|
||||
sourceAbbrev = src.abbrev,
|
||||
|
Reference in New Issue
Block a user