mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Add singleplayer and campaign rewards screens #70
This commit is contained in:
@@ -455,6 +455,10 @@ impl Database {
|
||||
.and_then(|(_, player)| player))
|
||||
}
|
||||
|
||||
pub async fn insert_player(&self, entity: crate::schema::multiplayer_game_player::ActiveModel) -> Result<crate::schema::multiplayer_game_player::Model, sea_orm::DbErr> {
|
||||
entity.insert(&self.orm).await
|
||||
}
|
||||
|
||||
pub async fn insert_players(&self, entities: Vec<crate::schema::multiplayer_game_player::ActiveModel>) -> Result<(), sea_orm::DbErr> {
|
||||
crate::schema::multiplayer_game_player::Entity::insert_many(entities.into_iter()).exec(&self.orm).await?;
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user