mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 07:54:53 +00:00
Rename userUuid to invitedUserUuid in project-user controller and service
This commit is contained in:
@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user