mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-11 07:38:49 +00:00
Add endpoint to update user web agreement
This commit is contained in:
@ -5,6 +5,7 @@ import {
|
||||
Get,
|
||||
HttpStatus,
|
||||
Param,
|
||||
Patch,
|
||||
Put,
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
@ -21,6 +22,7 @@ import { CheckProfilePictureGuard } from 'src/guards/profile.picture.guard';
|
||||
import { SuperAdminRoleGuard } from 'src/guards/super.admin.role.guard';
|
||||
import { EnableDisableStatusEnum } from '@app/common/constants/days.enum';
|
||||
import { ControllerRoute } from '@app/common/constants/controller-route';
|
||||
import { BaseResponseDto } from '@app/common/dto/base.response.dto';
|
||||
|
||||
@ApiTags('User Module')
|
||||
@Controller({
|
||||
@ -151,4 +153,18 @@ export class UserController {
|
||||
message: 'User deleted successfully',
|
||||
};
|
||||
}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Patch('agreements/web/:userUuid')
|
||||
@ApiOperation({
|
||||
summary: ControllerRoute.USER.ACTIONS.UPDATE_USER_WEB_AGREEMENT_SUMMARY,
|
||||
description:
|
||||
ControllerRoute.USER.ACTIONS.UPDATE_USER_WEB_AGREEMENT_DESCRIPTION,
|
||||
})
|
||||
async acceptWebAgreement(
|
||||
@Param('userUuid') userUuid: string,
|
||||
): Promise<BaseResponseDto> {
|
||||
return this.userService.acceptWebAgreement(userUuid);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user