Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Add support for printing api token email on whoami #1212

Merged
merged 5 commits into from
Apr 22, 2020

Conversation

dhaynespls
Copy link
Contributor

  • query the same api endpoint as we do with the global token, but now with the api token
  • return errors, print helpful statement if the api token doesn't have the right permission

Closes #863

- query the same api endpoint as we do with the global token, but now with the api token
- return errors, print helpful statement if the api token doesn't have the right permission

Closes #863
Copy link
Contributor

@EverlastingBugstopper EverlastingBugstopper left a comment

Choose a reason for hiding this comment

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

This looks great! I have a few pointers that should make this implementation a bit more idiomatic. After that's addressed we should be good to go :)

I haven't tested the code with the suggestions so some modifications may be necessary, would definitely test them out before accepting them :)

src/commands/whoami/mod.rs Outdated Show resolved Hide resolved
src/commands/whoami/mod.rs Outdated Show resolved Hide resolved
src/commands/whoami/mod.rs Outdated Show resolved Hide resolved
src/commands/whoami/mod.rs Outdated Show resolved Hide resolved
src/commands/whoami/mod.rs Outdated Show resolved Hide resolved
src/commands/whoami/mod.rs Outdated Show resolved Hide resolved
- headspace was in go lang with using "" for handling errors :P
@EverlastingBugstopper EverlastingBugstopper merged commit 086bacf into master Apr 22, 2020
@delete-merged-branch delete-merged-branch bot deleted the dhaynes/863-whoami-email branch April 22, 2020 19:36
@EverlastingBugstopper EverlastingBugstopper added this to the 1.9.0 milestone Apr 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wrangler whoami cannot print out email for users using API tokens
2 participants