get the dioxus CLI compiling

This commit is contained in:
Evan Almloff committed 2024-02-16 14:55:44 -06:00
1 parent 30af559275
commit e7d8a25d17
8 files changed
+40 -42

No files matched your search

+5 -5
View File
@@ -54,6 +54,7 @@
//! }
//! ```
use axum::routing::*;
use axum::{
body::{self, Body},
extract::State,
@@ -63,12 +64,11 @@ use axum::{
Router,
};
use dioxus_lib::prelude::VirtualDom;
use http::header::*;
use server_fn::error::NoCustomError;
use server_fn::error::ServerFnErrorSerde;
use std::sync::Arc;
use std::sync::RwLock;
use axum::routing::*;
use http::header::*;
use crate::{
prelude::*, render::SSRState, serve_config::ServeConfig, server_context::DioxusServerContext,
@@ -196,12 +196,12 @@ where
for (path, method) in server_fn::axum::server_fn_paths() {
tracing::trace!("Registering server function: {} {}", method, path);
let handler = move |req| handle_server_fns_inner(path, ||{}, req);
let handler = move |req| handle_server_fns_inner(path, || {}, req);
self = match method {
Method::GET => self.route(path, get(handler)),
Method::POST => self.route(path, post(handler)),
Method::PUT => self.route(path, put(handler)),
_ => todo!()
_ => todo!(),
};
}
@@ -548,4 +548,4 @@ async fn handle_server_fns_inner(
)
.into_response()
})
}
}
+1 -2
View File
@@ -20,7 +20,6 @@ pub mod launch;
mod hot_reload;
pub use config::*;
#[cfg(feature = "server")]
mod render;
@@ -73,8 +72,8 @@ pub mod prelude {
#[cfg_attr(docsrs, doc(cfg(feature = "server")))]
pub use dioxus_ssr::incremental::IncrementalRendererConfig;
pub use server_fn::{self, ServerFn as _, ServerFnError};
pub use dioxus_server_macro::*;
pub use server_fn::{self, ServerFn as _, ServerFnError};
}
// // Warn users about overlapping features