Something went wrong. Try again.
PDS software with bells & whistles you didn’t even know you needed. will move this to its own account when ready.
Something went wrong. Try again.
824 B · 31 lines
Rust
at main
1234567891011121314151617181920212223242526272829303132use crate::api::SuccessResponse;use crate::state::AppState;use axum::{ Json, extract::State, response::{IntoResponse, Response},};use serde::Deserialize;
#[derive(Deserialize)]#[serde(rename_all = "camelCase")]pub struct ConfirmChannelVerificationInput { pub channel: String, pub identifier: String, pub code: String,}
pub async fn confirm_channel_verification( State(state): State<AppState>, Json(input): Json<ConfirmChannelVerificationInput>,) -> Response { let token_input = crate::api::server::VerifyTokenInput { token: input.code, identifier: input.identifier, };
match crate::api::server::verify_token_internal(&state, token_input).await { Ok(_output) => SuccessResponse::ok().into_response(), Err(e) => e.into_response(), }}