use axum::Json;
use axum::http::StatusCode;
use axum::response::IntoResponse;
use serde_json::json;
use systemprompt_security::manifest_signing;
pub async fn pubkey() -> impl IntoResponse {
match manifest_signing::pubkey_b64() {
Ok(b64) => (StatusCode::OK, Json(json!({ "pubkey": b64 }))).into_response(),
Err(e) => (
StatusCode::INTERNAL_SERVER_ERROR,
Json(json!({ "error": e })),
)
.into_response(),
}
}