Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/afertil/nest-chat-api
/ functions
Functions
53 in github.com/afertil/nest-chat-api
⨍
Functions
53
◇
Types & classes
35
↓ 4 callers
Method
verify
* Validates the token * * @param {string} token - The JWT token to validate * @param {boolean} isWs - True to handle WS exception instead
src/modules/auth/jwt/jwt.service.ts:46
↓ 3 callers
Method
findById
(id: string)
src/modules/rooms/rooms.service.ts:51
↓ 3 callers
Method
sign
* Signs the user to the application by generating JWT tokens * * @param credentials - The user credentials * @returns data - The access an
src/modules/auth/auth.service.ts:40
↓ 2 callers
Method
create
(user: User)
src/modules/users/users.service.ts:13
↓ 2 callers
Method
findById
(id: string)
src/modules/users/users.service.ts:27
↓ 2 callers
Method
generateToken
* Generates a new JWT token * * @param {User} user - The user to create the payload for the JWT * @returns {Promise} tokens - The access a
src/modules/auth/jwt/jwt.service.ts:21
↓ 1 callers
Method
addMessage
(message: Message, id: string)
src/modules/rooms/rooms.service.ts:19
↓ 1 callers
Function
bootstrap
()
src/server.ts:25
↓ 1 callers
Method
checkUserPassword
* Verifies the user used the right credentials * * @param signedUser * * @returns {Boolean} isValid - true if the user can be authenti
src/modules/auth/auth.service.ts:23
↓ 1 callers
Method
create
(room: Room)
src/modules/rooms/rooms.service.ts:14
↓ 1 callers
Method
findAll
(options?: any)
src/modules/users/users.service.ts:18
↓ 1 callers
Method
findAll
(options?: any)
src/modules/rooms/rooms.service.ts:39
↓ 1 callers
Method
findMessages
(id: string, limit: number)
src/modules/rooms/rooms.service.ts:27
↓ 1 callers
Method
findOne
( options: any, fields?: any, isSerialized?: boolean )
src/modules/users/users.service.ts:37
↓ 1 callers
Method
findWithLimit
(id: string, limit: number)
src/modules/rooms/rooms.service.ts:43
Method
canActivate
(context: ExecutionContext)
src/modules/common/guards/roles.guard.ts:9
Method
configure
(consumer: MiddlewareConsumer)
src/modules/users/users.module.ts:16
Method
constructor
( @InjectModel('User') private readonly UserModel: Model<User> )
src/modules/users/users.service.ts:9
Method
constructor
(private readonly usersService: UsersService)
src/modules/users/users.controller.ts:19
Method
constructor
( private readonly usersService: UsersService, private readonly jwtService: JwtService )
src/modules/auth/auth.service.ts:11
Method
constructor
( private readonly authService: AuthService )
src/modules/auth/auth.controller.ts:8
Method
constructor
(private readonly usersService: UsersService)
src/modules/auth/jwt/jwt.service.ts:13
Method
constructor
( private jwtService: JwtService, private roomService: RoomsService )
src/modules/chat/chat.gateway.ts:22
Method
constructor
( @InjectModel('Room') private readonly roomModel: Model<Room> )
src/modules/rooms/rooms.service.ts:10
Method
constructor
(private readonly roomsService: RoomsService)
src/modules/rooms/rooms.controller.ts:18
Method
constructor
(private readonly reflector: Reflector)
src/modules/common/guards/roles.guard.ts:7
Method
constructor
(private readonly jwtService: JwtService)
src/modules/common/middlewares/auth.middleware.ts:16
Method
create
(@Body() body)
src/modules/users/users.controller.ts:46
Method
create
(@Body() body: Room)
src/modules/rooms/rooms.controller.ts:45
Method
delete
(id: number)
src/modules/users/users.service.ts:55
Method
delete
(@Request() req)
src/modules/users/users.controller.ts:66
Method
delete
(id: string)
src/modules/rooms/rooms.service.ts:63
Method
delete
(@Request() req)
src/modules/rooms/rooms.controller.ts:67
Method
findOne
(options?: any, fields?: any)
src/modules/rooms/rooms.service.ts:55
Method
handleConnection
(socket)
src/modules/chat/chat.gateway.ts:27
Method
handleDisconnect
(socket)
src/modules/chat/chat.gateway.ts:39
Method
imageFilter
(request, file, cb)
src/modules/common/middlewares/fileUpload.middleware.ts:27
Method
index
()
src/modules/users/users.controller.ts:22
Method
index
()
src/modules/rooms/rooms.controller.ts:21
Method
login
(@Request() req)
src/modules/auth/auth.controller.ts:13
Method
onMessage
(client, data: any)
src/modules/chat/chat.gateway.ts:58
Method
onRoomJoin
(client, data: any)
src/modules/chat/chat.gateway.ts:71
Method
onRoomLeave
(client, data: any)
src/modules/chat/chat.gateway.ts:81
Method
refreshToken
* Generating new JWT tokens to keep the user authenticated * * @param token * @returns data - The new access and the refresh token to auth
src/modules/auth/auth.service.ts:67
Method
refreshToken
(@Request() req)
src/modules/auth/auth.controller.ts:23
Method
resolve
()
src/modules/common/middlewares/fileUpload.middleware.ts:11
Method
resolve
()
src/modules/common/middlewares/auth.middleware.ts:18
Method
show
(@Request() req)
src/modules/users/users.controller.ts:27
Method
show
(@Request() req)
src/modules/rooms/rooms.controller.ts:26
Method
update
(id: number, newValue: User)
src/modules/users/users.service.ts:51
Method
update
(@Request() req)
src/modules/users/users.controller.ts:54
Method
update
(id: string, newValue: Room)
src/modules/rooms/rooms.service.ts:59
Method
update
(@Request() req)
src/modules/rooms/rooms.controller.ts:55