Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POST /questions/:id route #36

Open
Chloeh24 opened this issue Apr 17, 2020 · 0 comments
Open

POST /questions/:id route #36

Chloeh24 opened this issue Apr 17, 2020 · 0 comments
Labels
bug Something isn't working code review

Comments

@Chloeh24
Copy link

This should be POST /questions, otherwise if you put in an id it fixes the User_id property.

When you post a question though, req.body doesn't have an id so user_id isn't getting anything. It needs to be passed in from somewhere. I think your schema needs to have it set within it

INSERT INTO questions (user_id, question) VALUES (2, 'What book would you add to the school curiculum?');

I've been trying to fix it but I haven't had long enough :/ Good work though guys!

@Chloeh24 Chloeh24 added bug Something isn't working code review labels Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working code review
Projects
None yet
Development

No branches or pull requests

1 participant