mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Publish joex from within the job store
Reduces friction when using the job store.
This commit is contained in:
@ -121,8 +121,7 @@ object AttachmentRoutes {
|
||||
for {
|
||||
res <- backend.item.generatePreview(
|
||||
MakePreviewArgs.replace(id),
|
||||
user.account,
|
||||
true
|
||||
user.account
|
||||
)
|
||||
resp <- Ok(
|
||||
Conversions.basicResult(res, "Generating preview image task submitted.")
|
||||
@ -169,7 +168,7 @@ object AttachmentRoutes {
|
||||
HttpRoutes.of {
|
||||
case POST -> Root / "generatePreviews" =>
|
||||
for {
|
||||
res <- backend.item.generateAllPreviews(MakePreviewArgs.StoreMode.Replace, true)
|
||||
res <- backend.item.generateAllPreviews(MakePreviewArgs.StoreMode.Replace)
|
||||
resp <- Ok(
|
||||
Conversions.basicResult(res, "Generate all previews task submitted.")
|
||||
)
|
||||
@ -178,7 +177,7 @@ object AttachmentRoutes {
|
||||
case POST -> Root / "convertallpdfs" =>
|
||||
for {
|
||||
res <-
|
||||
backend.item.convertAllPdf(None, None, true)
|
||||
backend.item.convertAllPdf(None, None)
|
||||
resp <- Ok(Conversions.basicResult(res, "Convert all PDFs task submitted"))
|
||||
} yield resp
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ object FileRepositoryRoutes {
|
||||
for {
|
||||
input <- req.as[FileRepositoryCloneRequest]
|
||||
args = makeTaskArgs(input)
|
||||
job <- backend.fileRepository.cloneFileRepository(args, true)
|
||||
job <- backend.fileRepository.cloneFileRepository(args)
|
||||
result = BasicResult(
|
||||
job.isDefined,
|
||||
job.fold(s"Job for '${FileCopyTaskArgs.taskName.id}' already running")(j =>
|
||||
@ -46,7 +46,7 @@ object FileRepositoryRoutes {
|
||||
case req @ POST -> Root / "integrityCheck" =>
|
||||
for {
|
||||
input <- req.as[FileKeyPart]
|
||||
job <- backend.fileRepository.checkIntegrityAll(input, true)
|
||||
job <- backend.fileRepository.checkIntegrityAll(input)
|
||||
result = BasicResult(
|
||||
job.isDefined,
|
||||
job.fold(s"Job for '${FileCopyTaskArgs.taskName.id}' already running")(j =>
|
||||
|
@ -111,7 +111,7 @@ object IntegrationEndpointRoutes {
|
||||
cfg.backend.files.validMimeTypes
|
||||
)
|
||||
account = AccountId(coll, DocspellSystem.user)
|
||||
result <- backend.upload.submit(updata, account, true, None)
|
||||
result <- backend.upload.submit(updata, account, None)
|
||||
res <- Ok(basicResult(result))
|
||||
} yield res
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ object ItemMultiRoutes extends NonEmptyListSupport with MultiIdSupport {
|
||||
for {
|
||||
json <- req.as[IdList]
|
||||
items <- requireNonEmpty(json.ids)
|
||||
res <- backend.item.reprocessAll(items, user.account, true)
|
||||
res <- backend.item.reprocessAll(items, user.account)
|
||||
resp <- Ok(Conversions.basicResult(res, "Re-process task(s) submitted."))
|
||||
} yield resp
|
||||
|
||||
|
@ -388,7 +388,7 @@ object ItemRoutes {
|
||||
for {
|
||||
data <- req.as[IdList]
|
||||
_ <- logger.debug(s"Re-process item ${id.id}")
|
||||
res <- backend.item.reprocess(id, data.ids, user.account, true)
|
||||
res <- backend.item.reprocess(id, data.ids, user.account)
|
||||
resp <- Ok(Conversions.basicResult(res, "Re-process task submitted."))
|
||||
} yield resp
|
||||
|
||||
|
@ -96,7 +96,7 @@ object UploadRoutes {
|
||||
prio,
|
||||
cfg.backend.files.validMimeTypes
|
||||
)
|
||||
result <- backend.upload.submitEither(updata, accOrSrc, true, itemId)
|
||||
result <- backend.upload.submitEither(updata, accOrSrc, itemId)
|
||||
res <- Ok(basicResult(result))
|
||||
} yield res
|
||||
}
|
||||
|
Reference in New Issue
Block a user