Skip to content

Commit

Permalink
review(organizations/actions/orgs): avoid mutation of bucket in creat…
Browse files Browse the repository at this point in the history
…eOrgWithBucket
  • Loading branch information
desa committed Aug 1, 2019
1 parent b22e5cd commit bb1efd0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/src/organizations/actions/orgs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ export const createOrgWithBucket = (
dispatch(addOrg(createdOrg))
dispatch(push(`/orgs/${createdOrg.id}`))

bucket.orgID = createdOrg.id

const bucketResp = await api.postBucket({data: bucket})
const bucketResp = await api.postBucket({
data: {...bucket, orgID: createdOrg.id},
})

if (bucketResp.status !== 201) {
throw new Error(bucketResp.data.message)
Expand Down

0 comments on commit bb1efd0

Please sign in to comment.