allow adding boatdamage from everyone
This commit is contained in:
parent
1c75b478e3
commit
c27b83e9fd
@ -69,14 +69,14 @@ pub struct FormBoatDamageToAdd<'r> {
|
||||
async fn create<'r>(
|
||||
db: &State<SqlitePool>,
|
||||
data: Form<FormBoatDamageToAdd<'r>>,
|
||||
coxuser: CoxUser,
|
||||
user: User,
|
||||
) -> Flash<Redirect> {
|
||||
return Flash::error(Redirect::to("/log"), "Du musst noch kurz geduldig sein. Sobald wir unser Logbuch umgestellt haben, kannst du es hier im Ruderassistenten verwenden ;)");
|
||||
let boatdamage_to_add = BoatDamageToAdd {
|
||||
boat_id: data.boat_id,
|
||||
desc: data.desc,
|
||||
lock_boat: data.lock_boat,
|
||||
user_id_created: coxuser.id as i32,
|
||||
user_id_created: user.id as i32,
|
||||
};
|
||||
match BoatDamage::create(db, boatdamage_to_add).await {
|
||||
Ok(_) => Flash::success(
|
||||
|
Loading…
Reference in New Issue
Block a user