-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
| const addPosts = (data) => connection.query('INSERT INTO posts (post_title,user_id,post_content,post_img) values ($1, $2, $3, $4) returning *', [data.post_title, '1', data.post_content, data.post_img]); // Till we complete our website the user_is should be 1 |
You used this query in a wrong way to add a new post and I see you didn't add a condition that connect two tables (users and posts) correctly and instead you add some data as a hard code.