Initial Commit

This commit is contained in:
Dries Augustyns
2024-07-23 13:49:48 +02:00
commit 91a8840c3c
191 changed files with 36022 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import {prisma} from '../database/prisma';
import {verifyHash} from '../util/hash';
export class AuthService {
public static async verifyCredentials(email: string, password: string) {
const user = await prisma.user.findUnique({
where: {
email: email,
},
});
if (!user?.password) {
return false;
}
return await verifyHash(password, user.password);
}
}