From a73fe75141a49de92f9dba7f5d35184105851a42 Mon Sep 17 00:00:00 2001 From: dusk Date: Sat, 2 Nov 2024 18:28:59 +0300 Subject: [PATCH] fix(gazebot): use as_str to actually get the noteid value --- gazebot/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gazebot/src/main.rs b/gazebot/src/main.rs index b399dd8..6bf4447 100644 --- a/gazebot/src/main.rs +++ b/gazebot/src/main.rs @@ -52,7 +52,7 @@ impl EventHandler for Handler { }; let note_resp = resp.json::().await.unwrap(); - let created_note_id = note_resp["noteId"].to_string(); + let created_note_id = note_resp["noteId"].as_str().expect("note id must be a string"); tracing::info!("succesfully created note with id {created_note_id}"); let _ = msg.reply(ctx, format!("created log at https://gaze.systems/log?id={created_note_id}")).await;