mirror of
https://github.com/minio/minio.git
synced 2025-11-21 18:26:04 -05:00
Tweak fetchBuckets to comply with the changes made to the routes (#5592)
This commit removes the argument in the fetchBuckets function that was introduced in #5580. Due to the adjustment made in #5584, we no longer need to differentiate between where the function has been called from.
This commit is contained in:
committed by
Harshavardhana
parent
6a15b89b9a
commit
384b4fdf28
@@ -29,7 +29,7 @@ export const SHOW_MAKE_BUCKET_MODAL = "buckets/SHOW_MAKE_BUCKET_MODAL"
|
||||
export const SHOW_BUCKET_POLICY = "buckets/SHOW_BUCKET_POLICY"
|
||||
export const SET_POLICIES = "buckets/SET_POLICIES"
|
||||
|
||||
export const fetchBuckets = action => {
|
||||
export const fetchBuckets = () => {
|
||||
return function(dispatch) {
|
||||
return web.ListBuckets().then(res => {
|
||||
const buckets = res.buckets ? res.buckets.map(bucket => bucket.name) : []
|
||||
@@ -41,7 +41,7 @@ export const fetchBuckets = action => {
|
||||
} else {
|
||||
dispatch(selectBucket(buckets[0]))
|
||||
}
|
||||
} else if (action === "delete") {
|
||||
} else {
|
||||
dispatch(selectBucket(""))
|
||||
history.replace("/")
|
||||
}
|
||||
@@ -112,7 +112,7 @@ export const deleteBucket = bucket => {
|
||||
})
|
||||
)
|
||||
dispatch(removeBucket(bucket))
|
||||
dispatch(fetchBuckets("delete"))
|
||||
dispatch(fetchBuckets())
|
||||
})
|
||||
.catch(err => {
|
||||
dispatch(
|
||||
|
||||
Reference in New Issue
Block a user