mirror of
https://github.com/R0m1k3/podcastic.git
synced 2026-10-20 13:38:04 +02:00
fix: add @types/cors and fix jwt expiresIn type
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
faec1f37b4
commit
ffb85ade90
2 files changed
+5
-2
No files matched your search
@@ -1,9 +1,11 @@
|
||||
import jwt from 'jsonwebtoken';
|
||||
import { IUser } from '../models/User';
|
||||
|
||||
import type { SignOptions } from 'jsonwebtoken';
|
||||
|
||||
const JWT_SECRET = process.env.JWT_SECRET || 'dev_secret_key';
|
||||
const JWT_EXPIRES_IN = process.env.JWT_EXPIRES_IN || '7d';
|
||||
const JWT_REFRESH_EXPIRES_IN = process.env.JWT_REFRESH_EXPIRES_IN || '30d';
|
||||
const JWT_EXPIRES_IN = (process.env.JWT_EXPIRES_IN || '7d') as SignOptions['expiresIn'];
|
||||
const JWT_REFRESH_EXPIRES_IN = (process.env.JWT_REFRESH_EXPIRES_IN || '30d') as SignOptions['expiresIn'];
|
||||
|
||||
export interface JwtPayload {
|
||||
id: string;
|
||||
|
||||
Reference in new issue
Block a user