[Reactives3client] use for-comprehension
This commit is contained in:
parent
837ab362c3
commit
9107e6f3eb
1 changed files with 4 additions and 2 deletions
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue