map stuff
This commit is contained in:
@ -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,
|
||||
},
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user