Ver código fonte

Change input for game creation

Lee Morgan 3 semanas atrás
pai
commit
2aefd10b46
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      src/controllers/game/create.rs

+ 2 - 2
src/controllers/game/create.rs

@@ -10,7 +10,7 @@ use crate::{
 #[derive(Deserialize)]
 struct Body {
     title: String,
-    world_context: String
+    game_context: String
 }
 
 #[post("/game")]
@@ -20,7 +20,7 @@ pub async fn route(
     req: HttpRequest
 ) -> Result<HttpResponse, HttpError> {
     let user = user_auth(&db, &req, true).await?;
-    let game = Game::new(body.title, body.world_context, user.id);
+    let game = Game::new(body.title, body.game_context, user.id);
     game.insert(&db).await?;
     Ok(HttpResponse::Ok().json(game))
 }