From 0b19c94acf7472146231ffc7535c88c763914b34 Mon Sep 17 00:00:00 2001 From: "dev@ftbsc" Date: Sun, 22 Jan 2023 19:01:48 +0100 Subject: [PATCH] fix: join request sends just the uuid --- src/proto.rs | 2 +- src/routes/session.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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