diff --git a/src/proto.rs b/src/proto.rs index 0e22214..8a801b3 100644 --- a/src/proto.rs +++ b/src/proto.rs @@ -96,7 +96,7 @@ pub struct SignoutRequest { #[derive(Serialize, Deserialize)] pub struct JoinRequest { pub accessToken: String, - pub selectedProfile: Profile, + pub selectedProfile: Uuid, pub serverId: String, } diff --git a/src/routes/session.rs b/src/routes/session.rs index b84b79c..5bd0c7e 100644 --- a/src/routes/session.rs +++ b/src/routes/session.rs @@ -11,7 +11,7 @@ use crate::{AppState, proto, JoinAttempt, entities}; pub async fn join(State(state): State, Json(payload): Json) -> StatusCode { let user = entities::user::Entity::find().filter( - entities::user::Column::Uuid.eq(payload.selectedProfile.id) + entities::user::Column::Uuid.eq(payload.selectedProfile) ).one(&state.db).await.unwrap().unwrap(); let tokens = entities::token::Entity::find().filter( @@ -19,11 +19,11 @@ pub async fn join(State(state): State, Json(payload): Json