Rename userUuid to invitedUserUuid in project-user controller and service

This commit is contained in:
faris Aljohari
2025-01-04 04:26:37 -06:00
parent eac5fce859
commit 77061d3ce3
2 changed files with 6 additions and 6 deletions

View File

@ -35,14 +35,14 @@ export class ProjectUserController {
description: description:
ControllerRoute.PROJECT.ACTIONS.GET_USERS_BY_PROJECT_DESCRIPTION, ControllerRoute.PROJECT.ACTIONS.GET_USERS_BY_PROJECT_DESCRIPTION,
}) })
@Get(':userUuid') @Get(':invitedUserUuid')
async findUserByUuidInProject( async findUserByUuidInProject(
@Param() params: GetProjectParam, @Param() params: GetProjectParam,
@Param('userUuid') userUuid: string, @Param('invitedUserUuid') invitedUserUuid: string,
): Promise<BaseResponseDto> { ): Promise<BaseResponseDto> {
return this.projectUserService.getUserByUuidInProject( return this.projectUserService.getUserByUuidInProject(
params.projectUuid, params.projectUuid,
userUuid, invitedUserUuid,
); );
} }
} }

View File

@ -67,13 +67,13 @@ export class ProjectUserService {
} }
async getUserByUuidInProject( async getUserByUuidInProject(
projectUuid: string, projectUuid: string,
userUuid: string, invitedUserUuid: string,
): Promise<BaseResponseDto> { ): Promise<BaseResponseDto> {
try { try {
const user = await this.inviteUserRepository.findOne({ const user = await this.inviteUserRepository.findOne({
where: { where: {
project: { uuid: projectUuid }, project: { uuid: projectUuid },
uuid: userUuid, uuid: invitedUserUuid,
isActive: true, isActive: true,
}, },
select: [ select: [
@ -92,7 +92,7 @@ export class ProjectUserService {
if (!user) { if (!user) {
throw new HttpException( throw new HttpException(
`User with ID ${userUuid} not found in project ${projectUuid}`, `User with ID ${invitedUserUuid} not found in project ${projectUuid}`,
HttpStatus.NOT_FOUND, HttpStatus.NOT_FOUND,
); );
} }