diff --git a/apps/website/src/server/api/auth/me.get.ts b/apps/website/src/server/api/auth/me.get.ts index e02233c6..b5fa3c43 100644 --- a/apps/website/src/server/api/auth/me.get.ts +++ b/apps/website/src/server/api/auth/me.get.ts @@ -1,4 +1,4 @@ -import jwt, { verify } from 'jsonwebtoken' +import jwt from 'jsonwebtoken' import type { WebsiteProfile } from '@chat-game/types' export default defineEventHandler((event) => { @@ -13,7 +13,7 @@ export default defineEventHandler((event) => { } try { - const { profile } = verify(token, jwtSecretKey) as { profile: WebsiteProfile } + const { profile } = jwt.verify(token, jwtSecretKey) as { profile: WebsiteProfile } return profile } catch (error) { if (error instanceof jwt.TokenExpiredError) { diff --git a/apps/website/src/server/api/auth/twitch.get.ts b/apps/website/src/server/api/auth/twitch.get.ts index 7dd15747..59550e28 100644 --- a/apps/website/src/server/api/auth/twitch.get.ts +++ b/apps/website/src/server/api/auth/twitch.get.ts @@ -1,4 +1,4 @@ -import { sign } from 'jsonwebtoken' +import jwt from 'jsonwebtoken' import type { WebsiteProfile } from '@chat-game/types' export default defineEventHandler((event) => { @@ -23,7 +23,7 @@ export default defineEventHandler((event) => { userName: 'tester', } - const token = sign({ profile }, jwtSecretKey, { expiresIn: '48h' }) + const token = jwt.sign({ profile }, jwtSecretKey, { expiresIn: '48h' }) setCookie(event, publicEnv.cookieKey, token, { path: '/', diff --git a/apps/website/src/server/plugins/start.ts b/apps/website/src/server/plugins/start.ts index dedeae8f..7060ca89 100644 --- a/apps/website/src/server/plugins/start.ts +++ b/apps/website/src/server/plugins/start.ts @@ -1,13 +1,10 @@ -import { twitchController } from '../utils/twitch/twitch.controller' -import { twitchAddonController } from '../utils/twitch/twitch.addon.controller' -import { twitchWoodlandController } from '../utils/twitch/twitch.woodland.controller' import { twitchProvider } from '../utils/twitch/twitch.provider' export default defineNitroPlugin(() => { - void twitchController.serve() - void twitchController.serveStreamOnline() - void twitchAddonController.serve() - void twitchWoodlandController.serve() + // void twitchController.serve() + // void twitchController.serveStreamOnline() + // void twitchAddonController.serve() + // void twitchWoodlandController.serve() setTimeout(checkIfStreamingNow, 5000) })