use camelcase file names from now on...
This commit is contained in:
9
src/events/login.ts
Normal file
9
src/events/login.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { Server } from 'socket.io'
|
||||
import { TSocket } from '../utilities/types'
|
||||
|
||||
export default function (socket: TSocket, io: Server) {
|
||||
socket.on('login', () => {
|
||||
// return user data
|
||||
socket.emit('logged_in', { user: socket.user })
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user