simple-web-app

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit a0323e07eab1bd245d9ef5c3c3c644b37c67999f
parent cd0e3788c3b8a50081b9c3d462f26bf9edc2d042
Author: Silas Brack <silasbrack@gmail.com>
Date:   Sat, 25 Apr 2026 17:55:43 +0200

debug: log vote JSON payload

Diffstat:
Msrc/trailbase.rs | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/trailbase.rs b/src/trailbase.rs @@ -412,14 +412,14 @@ pub async fn vote(client: &Client, target_type: i64, target_id: i64) -> Result<( let user_id = extract_user_id_from_token(&tokens.auth_token) .ok_or_else(|| ClientError::Auth("Invalid token".to_string()))?; - eprintln!("Creating vote with user_id: {}", user_id); - let vote_data = CreateVote { - user_id, + user_id: user_id.clone(), target_type, target_id, }; + eprintln!("Creating vote with JSON: {}", serde_json::to_string(&vote_data).unwrap_or_default()); + match client.records("vote").create(&vote_data).await { Ok(id) => { eprintln!("Vote created with id: {}", id);