fix: removed unused packages
Signed-off-by: Varun Raj <mailme@varunraj.in>
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
"cmdk": "1.0.0",
|
||||
"date-fns": "^3.6.0",
|
||||
"drizzle-orm": "^0.33.0",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"lucide-react": "^0.428.0",
|
||||
"next": "14.2.5",
|
||||
"next-themes": "^0.3.0",
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { appConfig } from "@/config/app.config"
|
||||
import { ENV } from "@/config/environment"
|
||||
import { getCookie } from "@/lib/cookie"
|
||||
import { decodeJWT } from "@/lib/jwt"
|
||||
import { NextApiRequest } from "next"
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
import jwt from 'jsonwebtoken'
|
||||
|
||||
export const decodeJWT = (token: string, key: string): any => {
|
||||
try {
|
||||
const payload = jwt.verify(token, key, {
|
||||
ignoreExpiration: true
|
||||
})
|
||||
return payload
|
||||
} catch (error) {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
export const encodeJWT = (payload: any, key: string): string => {
|
||||
return jwt.sign(payload, key)
|
||||
}
|
||||
Reference in New Issue
Block a user