INNER CODE UNIT · Rust

into_response

zly2006/zhihu-plus-plus · aigc-vote-server/src/lib.rs:238

    fn into_response(self) -> Response {
        (
            self.status,
            Json(serde_json::json!({
                "error": self.message,
            })),
        )
            .into_response()
    }
}

pub fn app(state: AppState) -> Router {
    Router::new()
        .route("/healthz", get(healthz))
        .route("/v1/read-events:batch", post(post_read_events))
        .route(
            "/v1/contents/{content_type}/{content_id}/aigc-flag",
            get(get_flag_status).post(post_aigc_flag),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…