feat: better error handling and better toast messages

This commit is contained in:
Ephraim Atta-Duncan
2023-09-18 15:09:41 +00:00
committed by Mythie
parent 1e0cde850a
commit dec7a9cb38
6 changed files with 76 additions and 45 deletions

View File

@ -10,6 +10,8 @@ export interface SendResetPasswordOptions {
}
export const sendResetPassword = async ({ userId }: SendResetPasswordOptions) => {
// TODO: Better Error Handling
const user = await prisma.user.findFirstOrThrow({
where: {
id: userId,