wip: checkpoint multi-game core work
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use crate::extractors::GameId;
|
||||
use crate::{
|
||||
app::AppState,
|
||||
error::AppResult,
|
||||
@@ -7,8 +8,8 @@ use crate::{
|
||||
use axum::{extract::State, Json};
|
||||
use serde_json::{json, Value};
|
||||
|
||||
pub async fn get_profile(State(state): State<AppState>) -> AppResult<Json<Value>> {
|
||||
let profile = profile_svc::get_active_profile(&state.pool).await?;
|
||||
pub async fn get_profile(State(state): State<AppState>, game: GameId) -> AppResult<Json<Value>> {
|
||||
let profile = profile_svc::get_active_profile(&state.pool, game.as_str()).await?;
|
||||
let computed_level = level_for_xp(profile.xp);
|
||||
|
||||
let next_level = computed_level + 1;
|
||||
|
||||
Reference in New Issue
Block a user