diff --git a/examples/todo_app_sqlite_csr/src/todo.rs b/examples/todo_app_sqlite_csr/src/todo.rs index 7e6c15e90..0fb39a164 100644 --- a/examples/todo_app_sqlite_csr/src/todo.rs +++ b/examples/todo_app_sqlite_csr/src/todo.rs @@ -20,11 +20,10 @@ pub async fn db() -> Result { Ok(SqliteConnection::connect("sqlite:Todos.db").await?) } -#[server(GetTodos, "/api")] +#[server] pub async fn get_todos() -> Result, ServerFnError> { // this is just an example of how to access server context injected in the handlers - // http::Request doesn't implement Clone, so more work will be needed to do use_context() on this - let req_parts = use_context::(); + let req_parts = use_context::(); if let Some(req_parts) = req_parts { println!("Uri = {:?}", req_parts.uri);