From 7f532cda70a5160fd70195ddfb87ad97f4741f37 Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Wed, 10 Jan 2024 12:47:09 -0500 Subject: [PATCH] update todo_app_sqlite_csrs --- examples/todo_app_sqlite_csr/src/todo.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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);