fix: removed unused packages
Signed-off-by: Varun Raj <mailme@varunraj.in>
This commit is contained in:
1 parent
0da9504161
commit
62fc820bc7
3 files changed
-18
No files matched your search
@@ -35,7 +35,6 @@
|
|||||||
"cmdk": "1.0.0",
|
"cmdk": "1.0.0",
|
||||||
"date-fns": "^3.6.0",
|
"date-fns": "^3.6.0",
|
||||||
"drizzle-orm": "^0.33.0",
|
"drizzle-orm": "^0.33.0",
|
||||||
"jsonwebtoken": "^9.0.2",
|
|
||||||
"lucide-react": "^0.428.0",
|
"lucide-react": "^0.428.0",
|
||||||
"next": "14.2.5",
|
"next": "14.2.5",
|
||||||
"next-themes": "^0.3.0",
|
"next-themes": "^0.3.0",
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { appConfig } from "@/config/app.config"
|
import { appConfig } from "@/config/app.config"
|
||||||
import { ENV } from "@/config/environment"
|
import { ENV } from "@/config/environment"
|
||||||
import { getCookie } from "@/lib/cookie"
|
import { getCookie } from "@/lib/cookie"
|
||||||
import { decodeJWT } from "@/lib/jwt"
|
|
||||||
import { NextApiRequest } from "next"
|
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