// Get request for all items in db
'SELECT * FROM feed;'
// Post request to the database
'INSERT INTO feed (material, detail, quantity, location, contact, post_date) VALUES ($1, $2, $3, $4, $5, $6);'
// Delete Request
'DELETE FROM feed WHERE feed_id = ${givenItem};'
Notes
We had a JS date algo for assigning an automatic date stamp. We might've resolved this by changing our postgresql table setting.
Link: feedController.js
Feed controller Flow Chart
Controller methods
Notes
We had a JS date algo for assigning an automatic date stamp. We might've resolved this by changing our postgresql table setting.