Skip to content

Commit

Permalink
fix auth service
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriRomano committed Feb 22, 2024
1 parent 5ecf093 commit 829102d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/appointments/appointments.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export class AppointmentsService {
});
}

// updateStatus(appointmentId: string, status: App) {

findAll() {
return this.prismaService.appointment.findMany();
}
Expand Down
7 changes: 5 additions & 2 deletions src/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ export class AuthService {
};
}

async createAccessToken(userId: string) {
return this.jwtService.sign({ userId: userId }, { expiresIn: '15m' });
async createAccessToken(userId: string, role: Role) {
return this.jwtService.sign(
{ userId: userId, role: role },
{ expiresIn: '15m' },
);
}

async createRefreshToken(userId: string, role: Role) {
Expand Down
1 change: 0 additions & 1 deletion src/users/dto/create-user.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
// DERMATOLOGUE = 'DERMATOLOGUE',
// }
export class CreateUserDto {

@IsNotEmpty()
@IsString()
@ApiProperty()
Expand Down

0 comments on commit 829102d

Please sign in to comment.