16 lines
418 B
Rust
16 lines
418 B
Rust
async fn acme_renew(
|
|
State(state): State<Arc<App>>,
|
|
Extension(session): Extension<Session>,
|
|
Json(input): Json<RenewRequest>,
|
|
) -> Result<Response, ApiError> {
|
|
let job = crate::acme::Manager::renew(
|
|
state,
|
|
&input.certificate_id,
|
|
session.username,
|
|
input.dry_run,
|
|
false,
|
|
)
|
|
.await?;
|
|
Ok((StatusCode::ACCEPTED, Json(json!({"job":job}))).into_response())
|
|
}
|