mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Return a 404 if a source was not found when checking a file
This commit is contained in:
@ -43,7 +43,7 @@ object CheckFileRoutes {
|
||||
HttpRoutes.of { case GET -> Root / Ident(id) / checksum =>
|
||||
for {
|
||||
items <- backend.itemSearch.findByFileSource(checksum, id)
|
||||
resp <- Ok(convert(items))
|
||||
resp <- items.map(convert).map(Ok(_)).getOrElse(NotFound())
|
||||
} yield resp
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user