From c2c409f9d4c3781f38108bf6d086a6bba5a7059b Mon Sep 17 00:00:00 2001 From: Charlie Tonneslan Date: Mon, 18 May 2026 08:43:26 -0400 Subject: [PATCH] Drop unused token arg from TokensClient.Validate The arg never made it into the request - validation already piggybacks on the auth header that tursoClient(token) sets on the client. Dropping the parameter so it's clear it doesn't override the client's token, and updating the one caller (cmd/auth.go). Closes #988 Signed-off-by: Charlie Tonneslan --- internal/cmd/auth.go | 2 +- internal/turso/token.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cmd/auth.go b/internal/cmd/auth.go index 82c29ad3..bf37af95 100644 --- a/internal/cmd/auth.go +++ b/internal/cmd/auth.go @@ -123,7 +123,7 @@ func isJwtTokenValid(token string) bool { if err != nil { return false } - exp, err := client.Tokens.Validate(token) + exp, err := client.Tokens.Validate() if err != nil { return false } diff --git a/internal/turso/token.go b/internal/turso/token.go index 4fdea044..023473c5 100644 --- a/internal/turso/token.go +++ b/internal/turso/token.go @@ -7,7 +7,7 @@ import ( type TokensClient client -func (c *TokensClient) Validate(token string) (int64, error) { +func (c *TokensClient) Validate() (int64, error) { r, err := c.client.Get("/v1/auth/validate", nil) if err != nil { return 0, fmt.Errorf("failed to request validation: %s", err)