Fix uploading to enabled/disabled source endpoints

This commit is contained in:
Eike Kettner
2020-08-09 09:21:23 +02:00
parent 6460315b2b
commit 098e4cf868
4 changed files with 8 additions and 8 deletions

View File

@ -46,7 +46,7 @@ object UploadRoutes {
HttpRoutes.of {
case req @ POST -> Root / "item" / Ident(srcId) =>
(for {
_ <- OptionT(backend.collective.findSource(srcId))
_ <- OptionT(backend.collective.findEnabledSource(srcId))
res <- OptionT.liftF(
submitFiles(backend, cfg, Left(srcId))(req, None, Priority.Low, dsl)
)
@ -54,7 +54,7 @@ object UploadRoutes {
case req @ POST -> Root / "item" / Ident(itemId) / Ident(srcId) =>
(for {
_ <- OptionT(backend.collective.findSource(srcId))
_ <- OptionT(backend.collective.findEnabledSource(srcId))
res <- OptionT.liftF(
submitFiles(backend, cfg, Left(srcId))(req, Some(itemId), Priority.Low, dsl)
)