fix: get auth token for development (#4295)

This commit is contained in:
Peng Xiao
2023-09-12 13:31:58 +08:00
committed by GitHub
parent 98429bf89e
commit fc76163dd1
8 changed files with 131 additions and 34 deletions

View File

@@ -251,17 +251,4 @@ export class AuthService {
async sendChangeEmail(email: string, callbackUrl: string) {
return this.mailer.sendChangeEmail(email, callbackUrl);
}
async getSessionToken(userId: string) {
const session = await this.prisma.session.findFirst({
where: {
userId: userId,
},
});
if (!session) {
throw new BadRequestException(`No session found for user id ${userId}`);
}
return session?.sessionToken;
}
}