forked from Roflin/gamenight
Fixes leave on the server and reworked login flow.
This commit is contained in:
@@ -28,7 +28,9 @@ pub fn insert_gamenight_participant(conn: &mut DbConnection, gp: GamenightPartic
|
||||
}
|
||||
|
||||
pub fn delete_gamenight_participant(conn: &mut DbConnection, gp: GamenightParticipant) -> Result<usize, DatabaseError> {
|
||||
Ok(gamenight_participant::table
|
||||
.filter(gamenight_participant::gamenight_id.eq(&gp.gamenight_id).and(gamenight_participant::user_id.eq(gp.user_id)))
|
||||
Ok(diesel::delete(gamenight_participant::table
|
||||
.filter(gamenight_participant::gamenight_id.eq(&gp.gamenight_id)
|
||||
.and(gamenight_participant::user_id.eq(gp.user_id))))
|
||||
.execute(conn)?)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user