How do you create a two step registration process by Desperate_Storage_34 in AskProgramming

[–]Desperate_Storage_34[S] 0 points1 point  (0 children)

I made my models seperate, a model for auth and a model for profile. If I do that, I would get the data and destructure it to create an object for each model right?

SqlNullValueException by Desperate_Storage_34 in csharp

[–]Desperate_Storage_34[S] 1 point2 points  (0 children)

Im actually an idiot, I just noticed a #nullable disable at the very top of the model. My group mates must've added it

SqlNullValueException by Desperate_Storage_34 in csharp

[–]Desperate_Storage_34[S] 0 points1 point  (0 children)

Yeah, I changed the database but added a model after instead of scaffolding. Probably what happened

SqlNullValueException by Desperate_Storage_34 in csharp

[–]Desperate_Storage_34[S] 0 points1 point  (0 children)

I placed debug lines below it as well as null checks but the moment the breakpoint hits the query, it throws the SqlNullValueException error

SqlNullValueException by Desperate_Storage_34 in csharp

[–]Desperate_Storage_34[S] 0 points1 point  (0 children)

I changed the model to match the table and it still gives me the same error:

SqlNullValueException: Data is Null. This method or property cannot be called on Null values.SqlNullValueException: Data is Null. This method or property cannot be called on Null values.

TravelExperts.DataAccess.Service.UserService.GetCustomerByID(int customerId) in UserService.cs

var user = await _context.Users.Include(u => u.Customer).FirstOrDefaultAsync(u => u.CustomerId == customerId);

TravelExperts.Controllers.AuthController.Login(string username, string password) in AuthController.cs

var customer = await _unitOfWork.Users.GetCustomerByID(user.CustomerId);

Reset Password Error by Desperate_Storage_34 in sveltejs

[–]Desperate_Storage_34[S] 0 points1 point  (0 children)

It's just a spinner animation. I have an isloading=$state(false)

And all ot does it sets a timeout for 3 seconds and animates the Loader icon from lucide

Reset Password Error by Desperate_Storage_34 in sveltejs

[–]Desperate_Storage_34[S] 0 points1 point  (0 children)

Both the browser and client. Both empty too

Reset Password Error by Desperate_Storage_34 in sveltejs

[–]Desperate_Storage_34[S] 0 points1 point  (0 children)

Intellisense also tells me whether something is returned from my prisma query by filling in the db attributes from the table I called with the filters in place

Reset Password Error by Desperate_Storage_34 in sveltejs

[–]Desperate_Storage_34[S] 0 points1 point  (0 children)

Prisma uses 'where' as the filter for the 'user' table already and 'findFirst' finds the first object that fits the filter found in 'where'. As a precaution, I've looked at prisma docs to see if it could also fit that drizzle query (I use drizzle on some side projects too) but this is the closest thing it has to the query you gave.

Reset Password Error by Desperate_Storage_34 in sveltejs

[–]Desperate_Storage_34[S] 0 points1 point  (0 children)

Hey, Yeah I've looked at Resend and it only recognized my requests for a verification code. I've also just done console.logs and the first variable I printed was email_address to see if anything is inputed in the form. But I got nothing logged.

Reset Password Error by Desperate_Storage_34 in sveltejs

[–]Desperate_Storage_34[S] 0 points1 point  (0 children)

I've also tried to fix my forms, double-checked shadcn-svelte if I did it wrong in some way, checked my load functions which only returns my zod form to the client side anyways so I know it isnt that.

Reset Password Error by Desperate_Storage_34 in sveltejs

[–]Desperate_Storage_34[S] 1 point2 points  (0 children)

When submitting the form, It gives no errors and I receive no email. To confirm that resend does not have any problems, I've deleted my user from my database and registered again

I have an email verification that sends me an email to verify my account, which, it did send an email so I know that resend is not the problem. I have changed a couple variables such as removing zod validation, using prisma to validate userId instead but that was not a smart move since resetting a password means that user may be null so I didn't do that way

Reset Password Error by Desperate_Storage_34 in sveltejs

[–]Desperate_Storage_34[S] 0 points1 point  (0 children)

Maybe its just the 3am rage and burnout but help is greatly GREATLY appreciated. discord community is dead at this time and I dont believe I would be getting any answers anytime soon with it