From 1063f3240d377002934fa029fbf8418e89f1c4ca Mon Sep 17 00:00:00 2001 From: nyne Date: Fri, 30 May 2025 20:15:21 +0800 Subject: [PATCH] Fix invalid jwt --- server/utils/jwt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/utils/jwt.go b/server/utils/jwt.go index fc335eb..6a192cc 100644 --- a/server/utils/jwt.go +++ b/server/utils/jwt.go @@ -15,7 +15,7 @@ var ( func init() { secretFilePath := GetStoragePath() + "/jwt_secret.key" secret, err := os.ReadFile(secretFilePath) - if err != nil { + if err == nil { key = secret } else { // Initialize the key with a random value