@@ 6,8 6,8 @@
* See LICENSE for licensing information.
*/
-use diesel::{ExpressionMethods, PgConnection, QueryDsl, RunQueryDsl};
-use laurelin_shared::error::api::APIError;
+use diesel::{PgConnection, RunQueryDsl};
+use laurelin_shared::{error::api::APIError, types::game::GAMESTATE_FORMING};
use uuid::Uuid;
use crate::{
@@ 36,7 36,7 @@ pub(crate) fn create(conn: &mut PgConnection, user_id: &str) -> Result<Game, API
// TODO: handle unwrap
host_id: Uuid::parse_str(user_id).unwrap(),
guest_id: None,
- state: 0,
+ state: GAMESTATE_FORMING,
ended_at: None,
game_data_id: gamedata.id,
};