Skip to content

Commit

Permalink
Preparation for path argument deprecation in leptos_routes().
Browse files Browse the repository at this point in the history
  • Loading branch information
gibbz00 committed Nov 4, 2023
1 parent 62ed442 commit 6b0ba7d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use app::*;
use axum::{routing::post, Router};
use fileserv::file_and_error_handler;
use leptos::*;
use leptos_axum::{generate_route_list, LeptosRoutes};
use leptos_axum::LeptosRoutes;

pub mod fileserv;

Expand All @@ -18,12 +18,11 @@ async fn main() {
let conf = get_configuration(None).await.unwrap();
let leptos_options = conf.leptos_options;
let addr = leptos_options.site_addr;
let routes = generate_route_list(App);

// build our application with a route
let app = Router::new()
.route("/api/*fn_name", post(leptos_axum::handle_server_fns))
.leptos_routes(&leptos_options, routes, App)
.leptos_routes(&leptos_options, App)
.fallback(file_and_error_handler)
.with_state(leptos_options);

Expand Down

0 comments on commit 6b0ba7d

Please sign in to comment.