You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I store my data in a SurrealDB, but when I fetch the data with the generated id I cannot seem to be able to display it on the web page. When I print with rocket::info! to the console then I see the real ID, but, then on the web page generated by it shows up as [object]. Why is that? What am I doing wrong? How to fix to show the real ID?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I store my data in a SurrealDB, but when I fetch the data with the generated id I cannot seem to be able to display it on the web page. When I print with
rocket::info!
to the console then I see the real ID, but, then on the web page generated by it shows up as[object]
. Why is that? What am I doing wrong? How to fix to show the real ID?main.rs
db.rs:
templates/index.html.tera
Full Source code: https://github.com/szabgab/rust.code-maven.com/tree/main/slides/rust/examples/rocket/simple-todo-with-surrealdb
also with instructions: https://rust.code-maven.com/slides/rust/simple-todo-list-with-rocket-and-surrealdb.html
Beta Was this translation helpful? Give feedback.
All reactions