mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2026-01-08 05:02:13 +00:00
auth in progress
This commit is contained in:
@@ -152,12 +152,10 @@ export class UsersRepository implements IUsersRepository {
|
||||
}
|
||||
|
||||
async revokeToken(id: string, token: string): Promise<User | null> {
|
||||
const revokedToken = await this.prisma.accessToken.update({
|
||||
where: {
|
||||
token: token,
|
||||
},
|
||||
const revokedToken = await this.prisma.revokedToken.create({
|
||||
data: {
|
||||
isRevoked: true,
|
||||
token: token,
|
||||
userId: id,
|
||||
},
|
||||
include: {
|
||||
user: true,
|
||||
|
||||
Reference in New Issue
Block a user