Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(admin): renew certs command #1880

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat(admin): renew certs command
  • Loading branch information
jonaro00 committed Sep 17, 2024
commit e56efc9524081b400f0c448c174e0e22abcd8908
2 changes: 2 additions & 0 deletions admin/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ pub enum Command {
UnsetBetaAccess {
user_id: String,
},

RenewCerts,
}

#[derive(Subcommand, Debug)]
Expand Down
6 changes: 6 additions & 0 deletions admin/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,10 @@ impl Client {

Ok(())
}

pub async fn renew_old_certificates(&self) -> Result<serde_json::Value> {
self.inner
.put_json("/admin/certificates/renew", Option::<()>::None)
.await
}
}
4 changes: 4 additions & 0 deletions admin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,9 @@ async fn main() {
client.set_beta_access(&user_id, false).await.unwrap();
println!("Unset user {user_id} beta access");
}
Command::RenewCerts => {
let res = client.renew_old_certificates().await.unwrap();
println!("{res}");
}
};
}