refactor game proto

This commit is contained in:
2025-12-02 14:24:31 +01:00
parent 0222332d3f
commit cccd5a9d83
2 changed files with 22 additions and 10 deletions
+14 -9
View File
@@ -1,5 +1,7 @@
use rocket::fs::FileServer;
use crate::items::Game;
#[macro_use]
extern crate rocket;
@@ -65,21 +67,24 @@ async fn index_fallback() -> Option<rocket::fs::NamedFile> {
#[launch]
fn rocket() -> _ {
let mut game_list: Vec<Game> = Vec::new();
let mut user_list: Vec<User> = Vec::new();
game_list.push(Game {
title: "Naramo Nuclear Plant V2".to_string(),
source: items::Source::Roblox.into(),
multiplayer: true,
min_players: 1,
max_players: 90,
price: 0,
remote_id: 0,
});
user_list.push(User {
person: items::Person {
name: "John".to_string(),
opinion: vec![items::Opinion {
game: Some(items::Game {
title: "Naramo Nuclear Plant V2".to_string(),
source: items::Source::Roblox.into(),
multiplayer: true,
min_players: 1,
max_players: 90,
price: 0,
remote_id: 0,
}),
title: "Naramo Nuclear Plant V2".to_string(),
would_play: true,
}],
},