mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2026-04-28 11:17:38 +02:00
added / fixed some types
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import cookie from 'cookie'
|
||||
|
||||
import logger from '../utils/logger'
|
||||
import dbtools from '../utils/dbtools'
|
||||
import cookie from 'cookie'
|
||||
import { Socket } from '../types/basicTypes'
|
||||
|
||||
import { testUser } from './auth.middleware'
|
||||
|
||||
@@ -11,7 +13,7 @@ interface Options {
|
||||
export default function SocketAuth(options: Options): any {
|
||||
const { userDB } = options
|
||||
|
||||
return (socket, next) => {
|
||||
return (socket: Socket, next: (arg0?: any) => void) => {
|
||||
try {
|
||||
const cookies = cookie.parse(socket.handshake.headers.cookie || '')
|
||||
const sessionID = cookies.sessionID
|
||||
|
||||
Reference in New Issue
Block a user