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:
ControllerRoute.PROJECT.ACTIONS.GET_USERS_BY_PROJECT_DESCRIPTION,
})
@Get(':userUuid')
@Get(':invitedUserUuid')
async findUserByUuidInProject(
@Param() params: GetProjectParam,
@Param('userUuid') userUuid: string,
@Param('invitedUserUuid') invitedUserUuid: string,
): Promise<BaseResponseDto> {
return this.projectUserService.getUserByUuidInProject(
params.projectUuid,
userUuid,
invitedUserUuid,
);
}
}

View File

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