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

chore:change function name to reflect route action #439

Merged
merged 2 commits into from
Nov 5, 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
8 changes: 4 additions & 4 deletions crates/cdk-axum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ pub struct MintState {
get_keyset_pubkeys,
get_keysets,
get_mint_info,
get_mint_bolt11_quote,
post_mint_bolt11_quote,
get_check_mint_bolt11_quote,
post_mint_bolt11,
get_melt_bolt11_quote,
post_melt_bolt11_quote,
get_check_melt_bolt11_quote,
post_melt_bolt11,
post_swap,
Expand All @@ -147,13 +147,13 @@ pub async fn create_mint_router(mint: Arc<Mint>, cache_ttl: u64, cache_tti: u64)
.route("/keysets", get(get_keysets))
.route("/keys/:keyset_id", get(get_keyset_pubkeys))
.route("/swap", post(cache_post_swap))
.route("/mint/quote/bolt11", post(get_mint_bolt11_quote))
.route("/mint/quote/bolt11", post(post_mint_bolt11_quote))
.route(
"/mint/quote/bolt11/:quote_id",
get(get_check_mint_bolt11_quote),
)
.route("/mint/bolt11", post(cache_post_mint_bolt11))
.route("/melt/quote/bolt11", post(get_melt_bolt11_quote))
.route("/melt/quote/bolt11", post(post_melt_bolt11_quote))
.route(
"/melt/quote/bolt11/:quote_id",
get(get_check_melt_bolt11_quote),
Expand Down
4 changes: 2 additions & 2 deletions crates/cdk-axum/src/router_handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ pub async fn get_keysets(State(state): State<MintState>) -> Result<Json<KeysetRe
/// Request a quote for minting of new tokens
///
/// Request minting of new tokens. The mint responds with a Lightning invoice. This endpoint can be used for a Lightning invoice UX flow.
pub async fn get_mint_bolt11_quote(
pub async fn post_mint_bolt11_quote(
State(state): State<MintState>,
Json(payload): Json<MintQuoteBolt11Request>,
) -> Result<Json<MintQuoteBolt11Response>, Response> {
Expand Down Expand Up @@ -216,7 +216,7 @@ pub async fn post_mint_bolt11(
)
))]
/// Request a quote for melting tokens
pub async fn get_melt_bolt11_quote(
pub async fn post_melt_bolt11_quote(
State(state): State<MintState>,
Json(payload): Json<MeltQuoteBolt11Request>,
) -> Result<Json<MeltQuoteBolt11Response>, Response> {
Expand Down
Loading