[Reactives3client] use for-comprehension

This commit is contained in:
Paul Campbell 2019-05-08 13:00:03 +01:00
parent 837ab362c3
commit 9107e6f3eb

View file

@ -14,7 +14,9 @@ class ReactiveS3Client extends S3Client {
.bucket(bucket)
.key(key)
.build()
s3Client.headObject(request).
map(r => (r.eTag(), r.lastModified()))
for {
response <- s3Client.headObject(request)
// TODO catch 404 error when key doesn't exist
} yield (response.eTag(), response.lastModified())
}
}