feat: better error handling and better toast messages

This commit is contained in:
Ephraim Atta-Duncan
2023-09-18 15:09:41 +00:00
parent 45f447c796
commit 079963cde8
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,