You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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!
The text was updated successfully, but these errors were encountered: