DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

771f9fc5f188affc61081b371ddd2ded9e680e7b — Jonni Liljamo 1 year, 9 months ago 6f6fb6c
fix(api): use gamestate consts
1 files changed, 3 insertions(+), 3 deletions(-)

M api/src/actions/game/create.rs
M api/src/actions/game/create.rs => api/src/actions/game/create.rs +3 -3
@@ 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,
    };