I got a 404 in my page when I click back in my browser #2276
Unanswered
QuintinTao
asked this question in
Q&A
Replies: 1 comment 1 reply
-
The code you shared is insufficient, how is the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I built a website with leptos.
Here is my critical code of the page
#[server(GetProjects, "/project")]
pub async fn get_projects() -> Result<Vec, ServerFnError> {
use crate::dao::*;
let req = use_context::<actix_web::HttpRequest>();
if let Some(req) = req {
println!("req.path = {:#?}", req.path());
}
use futures::TryStreamExt;
let mut conn = db().await?;
let mut todos = Vec::new();
let mut rows =
sqlx::query_as::<_, Project>("select * from tb_project limit 10").fetch(&mut conn);
while let Some(row) = rows.try_next().await? {
println!("{}", &row.title);
todos.push(row);
}
Ok(todos)
}
I can get the list when I visit the first page of the website. But when I click other pages and click back in my browser. I can't get the list.
initialization
after click “back”


Beta Was this translation helpful? Give feedback.
All reactions