refactored repo file to fit refactored auth

This commit is contained in:
2021-12-18 15:07:46 -05:00
parent c2b6db25f7
commit cef93da327
5 changed files with 173 additions and 192 deletions

View File

@@ -14,7 +14,6 @@ use clap::ArgMatches;
fn main() {
let matches: ArgMatches = arg::get_args();
let config = crate::config::Configuration::new();
let auth = request::Authentication::new(&config);
let request = auth.request_chooser(config.clone(), matches);
@@ -29,21 +28,21 @@ fn main() {
}
if repo_matches.is_present("delete") {
repo.delete_repo(&config, repo_matches);
repo.delete_repo(&request);
}
if repo_matches.is_present("fork") {
repo.fork_repo(&config, repo_matches)
repo.fork_repo(&request)
}
if repo_matches.is_present("search") {
repo.search_repo(&config, repo_matches)
repo.search_repo(&request)
}
if repo_matches.is_present("list") {
repo.list_repo(&config)
repo.list_repo(&request)
}
},
}
("issue", Some(issue_matches)) => {
let issue = issue::Issue::new();
@@ -51,8 +50,7 @@ fn main() {
if issue_matches.is_present("create") {
issue.create_issue(&config, issue_matches);
}
},
_ => println!("Huh?")
}
_ => println!("Huh?"),
}
}