summaryrefslogtreecommitdiffstats
path: root/src/prs.rs
diff options
context:
space:
mode:
authorCyborus <cyborus@cyborus.xyz>2024-05-31 21:25:59 +0200
committerCyborus <cyborus@cyborus.xyz>2024-06-04 04:18:27 +0200
commitc47a24ad2276b210f25b5294e210f9e7fa1e3404 (patch)
treeacfcc6bc03ef80542f8c91267a42bbb32cf511cb /src/prs.rs
parentupdate to `forgejo-api` v0.3.0 (diff)
downloadforgejo-cli-c47a24ad2276b210f25b5294e210f9e7fa1e3404.tar.xz
forgejo-cli-c47a24ad2276b210f25b5294e210f9e7fa1e3404.zip
add oauth token support to keys file
Diffstat (limited to 'src/prs.rs')
-rw-r--r--src/prs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/prs.rs b/src/prs.rs
index bd9852f..535b62e 100644
--- a/src/prs.rs
+++ b/src/prs.rs
@@ -249,10 +249,10 @@ pub enum ViewCommand {
}
impl PrCommand {
- pub async fn run(self, keys: &crate::KeyInfo, host_name: Option<&str>) -> eyre::Result<()> {
+ pub async fn run(self, keys: &mut crate::KeyInfo, host_name: Option<&str>) -> eyre::Result<()> {
use PrSubcommand::*;
let repo = RepoInfo::get_current(host_name, self.repo(), self.remote.as_deref())?;
- let api = keys.get_api(repo.host_url())?;
+ let api = keys.get_api(repo.host_url()).await?;
let repo = repo.name().ok_or_else(|| self.no_repo_error())?;
match self.command {
Create {