|
|
@@ -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))
|
|
|
}
|