Browse Source

🐛 fix(jwt): 修复JWT工具类型错误

- 修复SignOptions.expiresIn类型转换错误
- 使用正确的类型断言解决TypeScript类型问题
- 确保项目构建成功

🤖 Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
yourname 3 months ago
parent
commit
561f6431d3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/server/utils/jwt.util.ts

+ 1 - 1
src/server/utils/jwt.util.ts

@@ -39,7 +39,7 @@ export class JWTUtil {
 
     try {
       const options: SignOptions = {
-        expiresIn: expiresIn || JWT_EXPIRES_IN as SignOptions['expiresIn']
+        expiresIn: (expiresIn || JWT_EXPIRES_IN) as SignOptions['expiresIn']
       };
       return jwt.sign(payload, JWT_SECRET, options);
     } catch (error) {