This repository has been archived by the owner on Jul 16, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ciao-cli: code refactory of getTenant function
The getTenant function was evaluating single cases while it could have a base to validate with a more structure scenarios as proposed below. First validation: ensure the user has at least one project. Second validation: if not projectID defined and the user has only one project, return it as default project, if the user has two or more project then print the projects the user has. Third validation: iterate through all projects and see if the given tentantID matches any project of the user. If no condition matches, then it would return with the last instruction in the function. Signed-off-by: Leoswaldo Macias <[email protected]>
- Loading branch information