Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor removeBucket #1177

Merged
merged 10 commits into from
Jul 10, 2023
Merged

refactor removeBucket #1177

merged 10 commits into from
Jul 10, 2023

Conversation

trim21
Copy link
Contributor

@trim21 trim21 commented Jun 28, 2023

No description provided.

@prakashsvmx prakashsvmx changed the title refaactor removeBucket refactor removeBucket Jun 28, 2023
prakashsvmx
prakashsvmx previously approved these changes Jun 28, 2023
Copy link
Member

@prakashsvmx prakashsvmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested. 👍
Note: This operation will only work if your bucket is empty.

Callback style:

const bucketName = 'test-js-bucket-1'
s3Client.removeBucket(bucketName, function (e) {
  if (e) {
    return console.log(e.message)
  }
  console.log('Success')
})

Promise Style

s3Client
  .removeBucket('test-bucket-1')
  .then((res) => {
    console.log('Result::', res)
  })
  .catch((err) => {
    console.log('Error::', err.message)
  })

Async/Await

const removeBucketTest = async () => {
  try {
    await s3Client.removeBucket(bucketName)
    console.log('Success')
  } catch (err) {
    console.log(err.message)
  }
}

removeBucketTest()

@prakashsvmx
Copy link
Member

@trim21 could you please resolve the conflicts ?

@trim21 trim21 requested a review from prakashsvmx July 6, 2023 04:14
@trim21
Copy link
Contributor Author

trim21 commented Jul 6, 2023

I didn't remove callback API overload as you did for listBuckets.

@trim21
Copy link
Contributor Author

trim21 commented Jul 7, 2023

@kaankabalak

@prakashsvmx
Copy link
Member

@kaankabalak Could you please take a look ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants