mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-16 18:56:22 +00:00
finished get rooms api
This commit is contained in:
@ -14,17 +14,17 @@ export class RoomController {
|
||||
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Get(':userUuid')
|
||||
async userList(@Param('userUuid') userUuid: string) {
|
||||
@Get(':homeId')
|
||||
async userList(@Param('homeId') homeId: string) {
|
||||
try {
|
||||
return await this.roomService.getHomesByUserId(userUuid);
|
||||
return await this.roomService.getRoomsByHomeId(homeId);
|
||||
} catch (err) {
|
||||
throw new Error(err);
|
||||
}
|
||||
}
|
||||
|
||||
// @ApiBearerAuth()
|
||||
// @UseGuards(JwtAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Post()
|
||||
async addRoom(@Body() addRoomDto: AddRoomDto) {
|
||||
try {
|
||||
|
Reference in New Issue
Block a user