Merge branch 'development' into 'devops-staging'

fix: resend user

See merge request empatnusabangsa/ppob/ppob-backend!108
This commit is contained in:
ilham dwi pratama 2022-01-24 11:10:58 +00:00
commit ca70f7cef4
2 changed files with 6 additions and 3 deletions

View File

@ -298,7 +298,11 @@ export class UsersController {
@Put('resend-user/:id')
async resendUser(@Param('id', ParseUUIDPipe) id: string, @Request() req) {
return {
data: await this.usersService.confirmationUser(id, req.user, 'resend'),
data: await this.usersService.confirmationUser(
id,
req.user.userId,
'resend',
),
statusCode: HttpStatus.OK,
message: 'success',
};

View File

@ -571,7 +571,6 @@ export class UsersService {
const dataUser = await this.usersRepository.findOneOrFail(id);
const supervisorUser = await this.findExist(user);
if (status == 'approved') {
if (supervisorUser.roles.name == 'Admin') {
dataUser.status_approval = 'Done';