mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
feat-webgarages-121 (#129)
### Description Closes #121 ### Please confirm - [x] I am the legal owner or represent the legal owner of all work submitted (including LLM-generated code, if any) - [x] I consent to my changes being added to this FOSS project - [x] I have confirmed that this does not add new errors or warnings with `utils/clippy.sh` - [ ] This PR used LLMs to generate some or all of the code changes Reviewed-on: https://git.ngram.ca/OpenJam/rc-servers/pulls/129
This commit is contained in:
@@ -676,7 +676,19 @@ pub trait FactoryUser {
|
||||
|
||||
#[async_trait::async_trait]
|
||||
pub trait WebUser: CommonUser {
|
||||
async fn garages(&self) -> Result<Vec<GarageWebInfo>, Box<dyn std::error::Error>>;
|
||||
async fn garage_by_id(&self, id: i32) -> Result<Option<VehicleData>, Box<dyn std::error::Error>>;
|
||||
async fn save_garage(&self, vehicle: crate::persist::user::VehicleData, garage_id: Option<i32>, cpu_counter: &crate::cubes::CpuListParser, weapon_orderer: &crate::cubes::WeaponListParser) -> Result<(), Box<dyn std::error::Error>>;
|
||||
async fn garage_id_selected(&self) -> Result<Option<i32>, Box<dyn std::error::Error>>;
|
||||
}
|
||||
|
||||
pub struct GarageWebInfo {
|
||||
pub id: i32,
|
||||
pub slot: i32,
|
||||
pub total_robot_cpu: i32,
|
||||
pub bay_cpu: i32,
|
||||
pub name: String,
|
||||
pub creation_time: i64,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
|
||||
Reference in New Issue
Block a user