simple-web-app

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

commit b147b8dbc7d2e0a13d00492e29580ee1281ba30c
parent a0323e07eab1bd245d9ef5c3c3c644b37c67999f
Author: Silas Brack <silasbrack@gmail.com>
Date:   Sat, 25 Apr 2026 18:33:19 +0200

test: remove user_id from vote to check auto-fill

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

diff --git a/src/trailbase.rs b/src/trailbase.rs @@ -402,18 +402,12 @@ pub async fn calculate_comment_path( /// Create a vote #[derive(Debug, Serialize)] struct CreateVote { - user_id: String, target_type: i64, target_id: i64, } pub async fn vote(client: &Client, target_type: i64, target_id: i64) -> Result<(), ClientError> { - let tokens = client.tokens().ok_or_else(|| ClientError::Auth("Not authenticated".to_string()))?; - let user_id = extract_user_id_from_token(&tokens.auth_token) - .ok_or_else(|| ClientError::Auth("Invalid token".to_string()))?; - let vote_data = CreateVote { - user_id: user_id.clone(), target_type, target_id, };