add planned_trip functionality

This commit is contained in:
2023-04-04 12:19:56 +02:00
parent 3dfc64071c
commit 3d907487a1
12 changed files with 273 additions and 32 deletions

View File

@@ -38,7 +38,11 @@ struct UserEditForm {
}
#[post("/user", data = "<data>")]
async fn update(db: &State<SqlitePool>, data: Form<UserEditForm>) -> Flash<Redirect> {
async fn update(
db: &State<SqlitePool>,
data: Form<UserEditForm>,
_admin: AdminUser,
) -> Flash<Redirect> {
let user = User::find_by_id(db, data.id).await;
let user = match user {
Ok(user) => user,