Registration #188
Replies: 2 comments 1 reply
-
Solved! Just edit the |
Beta Was this translation helpful? Give feedback.
1 reply
-
We've omitted user registration to brevity but perhaps it would be helpful to include that as an illustration. While there's various patterns that will help with this, typically what I've seen is people will put a database connection pool into an application state that's passed into the handler. With this, you could accept a structure form of registration details and insert a new user row into the database. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sorry, I'm quite new both to Axum and this crate, but how do I even in the simple sqlite example, create a post request with the option to register? I understand that probably inserting it into the DB is enough, but then how do I get access to the DB from
async fn register()
function?Beta Was this translation helpful? Give feedback.
All reactions