M shared/src/api/mod.rs => shared/src/api/mod.rs +0 -1
@@ 10,7 10,6 @@ use reqwest;
use serde::{Deserialize, Serialize};
//pub mod game;
-pub mod types;
pub mod user;
mod macros;
M shared/src/api/user/mod.rs => shared/src/api/user/mod.rs +2 -2
@@ 9,9 9,9 @@
use reqwest;
use serde::{Deserialize, Serialize};
-use crate::error::api::APIError;
+use crate::{error::api::APIError, types::user::User};
-use super::{macros::extract_cookie, types::User};
+use super::macros::extract_cookie;
#[derive(Serialize)]
pub struct PostLogin {
M shared/src/lib.rs => shared/src/lib.rs +1 -0
@@ 9,3 9,4 @@
pub mod api;
pub mod error;
pub mod server;
+pub mod types;
A shared/src/types/game.rs => shared/src/types/game.rs +12 -0
@@ 0,0 1,12 @@
+/*
+ * This file is part of laurelin/shared
+ * Copyright (C) 2023 Jonni Liljamo <jonni@liljamo.com>
+ *
+ * Licensed under GPL-3.0-only.
+ * See LICENSE for licensing information.
+ */
+
+pub const GAMESTATE_FORMING: i16 = 0;
+pub const GAMESTATE_INPROGRESS: i16 = 1;
+pub const GAMESTATE_FINISHED: i16 = 2;
+pub const GAMESTATE_CANCELLED: i16 = 3;
A shared/src/types/mod.rs => shared/src/types/mod.rs +10 -0
@@ 0,0 1,10 @@
+/*
+ * This file is part of laurelin/shared
+ * Copyright (C) 2023 Jonni Liljamo <jonni@liljamo.com>
+ *
+ * Licensed under GPL-3.0-only.
+ * See LICENSE for licensing information.
+ */
+
+pub mod game;
+pub mod user;
R shared/src/api/types.rs => shared/src/types/user.rs +0 -0