From 5f8780ce2fb42d8acfc59c4649b16775bb25b8ca Mon Sep 17 00:00:00 2001 From: "dev@ftbsc" Date: Mon, 23 Jan 2023 04:19:53 +0100 Subject: [PATCH] fix: uuid and dashes... --- src/proto.rs | 2 +- src/routes/session.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proto.rs b/src/proto.rs index ed174f5..2bacb44 100644 --- a/src/proto.rs +++ b/src/proto.rs @@ -135,7 +135,7 @@ pub struct JoinRequest { #[derive(Serialize, Deserialize, Debug)] pub struct JoinResponse { - pub id: Uuid, + pub id: String, // must be given back without dashes pub name: String, pub properties: Vec, } diff --git a/src/routes/session.rs b/src/routes/session.rs index fe92008..3d5342f 100644 --- a/src/routes/session.rs +++ b/src/routes/session.rs @@ -82,7 +82,7 @@ pub async fn has_joined_local(state: &AppState, username: &String, server_id: &S if Utc::now() - join.time < Duration::seconds(state.cfg.time_window as i64) && join.server.to_lowercase() == server_id.to_lowercase() { let response = proto::JoinResponse { - id: user.uuid, + id: user.uuid.simple().to_string(), name: username.clone(), properties: vec![ skin ], };