1
0
forked from noxious/server

map stuff

This commit is contained in:
2024-05-04 15:03:38 +02:00
parent 2e380e9b10
commit 329c6597be
3 changed files with 77 additions and 44 deletions

View File

@ -24,4 +24,12 @@ export async function validateUser(username: string, password: string): Promise<
if (!user) return false;
return bcrypt.compareSync(password, user.password);
}
export async function getUser(username: string): Promise<any> {
return prisma.user.findUnique({
where: {
username,
},
});
}