Add endpoint to update user web agreement

This commit is contained in:
faris Aljohari
2025-01-22 00:34:54 -06:00
parent 6dd6c79d87
commit f675064b68
4 changed files with 43 additions and 9 deletions

View File

@ -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);
}
}