check if defaults.json exists on auth and check for success status codes#45
check if defaults.json exists on auth and check for success status codes#45jeremytregunna merged 4 commits intomasterfrom
Conversation
| if (org_name.length() < 1){ | ||
| console::error("Defaults error: no default organization found."); | ||
| return false; | ||
| } |
There was a problem hiding this comment.
I'm wondering if we shouldn't just automatically create a defaults.json after we've polled the orgs endpoint instead, and select their personal organization as default if no other default exists. Thoughts? Could be wrapped into the auth flow even.
There was a problem hiding this comment.
Ah that could be a smoother work flow for the user. Right now, If it didn't find a default, it would require you to authenticate then it would load the defaults. I kind of like the idea that when it checks for auth it would select your default or user organization if it wasn't. That being said, does that defeat the purpose of checking if they are authenticated/requiring them to reauth because we could potentially do it for the user's api-token as well?
There was a problem hiding this comment.
Hrmm... I'm honestly not sure. Let's ask Luke :)
"")defaults.jsonfile does not existdefaults.jsondoes exist butorg_nameis emptydefaults.jsonfile