Converted the Api to a Restful api.

This commit is contained in:
2026-01-22 22:51:03 +01:00
parent 79ba1e1b44
commit 9d3c5afb07
50 changed files with 2194 additions and 1939 deletions
@@ -13,6 +13,8 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct OwnedGame {
#[serde(rename = "user_id")]
pub user_id: String,
#[serde(rename = "game_id")]
pub game_id: String,
#[serde(rename = "location_id", skip_serializing_if = "Option::is_none")]
@@ -20,8 +22,9 @@ pub struct OwnedGame {
}
impl OwnedGame {
pub fn new(game_id: String) -> OwnedGame {
pub fn new(user_id: String, game_id: String) -> OwnedGame {
OwnedGame {
user_id,
game_id,
location_id: None,
}