mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-03 17:26:38 +00:00
Websocket working and newt auth working
This commit is contained in:
@@ -6,7 +6,6 @@ import { Socket } from 'net';
|
||||
import { Newt, newts, NewtSession } from '@server/db/schema';
|
||||
import { eq } from 'drizzle-orm';
|
||||
import db from '@server/db';
|
||||
import { newtGetToken } from './auth';
|
||||
import { validateNewtSessionToken } from '@server/auth/newt';
|
||||
|
||||
// Custom interfaces
|
||||
@@ -61,8 +60,6 @@ router.get('/ws', (req: Request, res: Response) => {
|
||||
res.status(200).send('WebSocket endpoint');
|
||||
});
|
||||
|
||||
router.get('/ws/auth/newtGetToken', newtGetToken);
|
||||
|
||||
// Set up WebSocket server handling
|
||||
const handleWSUpgrade = (server: HttpServer): void => {
|
||||
server.on('upgrade', async (request: WebSocketRequest, socket: Socket, head: Buffer) => {
|
||||
|
||||
Reference in New Issue
Block a user