N
Neon2y ago
fascinating-indigo

hey guys im having issues with my code:

hey guys im having issues with my code: using next pages router no ts, my main issue is the api itself i get a 400 error and tried it with postman no go
No description
No description
No description
No description
No description
10 Replies
extended-salmon
extended-salmon2y ago
what do you see if you console.log(data) also, shouldn't the username, email and password be logged? Are then undefined?
rival-black
rival-black2y ago
{ email: 'usuario@email.com', username: 'For_Science_Greg', password: 'passsword123' }
extended-salmon
extended-salmon2y ago
huh. That's so weird haha what happens when you log !username oh you can also enable type checking for this file without using typescript by adding // @ts-check to the top of a file.
rival-black
rival-black2y ago
i stopped using prisma and switched to neon/serveless npm package works way better now im only missing one thing and its this:
No description
No description
rival-black
rival-black2y ago
im trying to verify the password with becrypt for user to be able to login
harsh-harlequin
harsh-harlequin2y ago
1. Why use a separate query to get the user password? 2. Can you provide the console for the above operation
harsh-harlequin
harsh-harlequin2y ago
export const GET = async () => {
return NextResponse.json({ message: "Hello world" }, { status: 200 });
};
export const GET = async () => {
return NextResponse.json({ message: "Hello world" }, { status: 200 });
};
No description
harsh-harlequin
harsh-harlequin2y ago
try directory structure like this and then a code like this. it might help @streethippie466
rival-black
rival-black2y ago
Il get back to you later @Papa Johns im at work but im also not using ts
harsh-harlequin
harsh-harlequin2y ago
same goes for ts

Did you find this page helpful?