add example code; updated deploy script
This commit is contained in:
parent
e6d7f15cd8
commit
054efc99e3
@ -12,7 +12,7 @@ struct LoginForm<'r> {
|
|||||||
password: &'r str,
|
password: &'r str,
|
||||||
}
|
}
|
||||||
|
|
||||||
// name, is_admin, is_guest, is_cox
|
// curl -X POST localhost:8000/api/login -d "name=rower&password=rower"
|
||||||
#[post("/", data = "<login>")]
|
#[post("/", data = "<login>")]
|
||||||
async fn login(login: Form<LoginForm<'_>>, db: &State<SqlitePool>) -> String {
|
async fn login(login: Form<LoginForm<'_>>, db: &State<SqlitePool>) -> String {
|
||||||
match User::login(db, login.name, login.password).await {
|
match User::login(db, login.name, login.password).await {
|
||||||
|
Loading…
Reference in New Issue
Block a user