Create User database queries
whole object CRUD queries should be defined in controllers/user.js
The user controller should import pg and create a client. It should contain four functions:
- create: takes a user object as input, puts a new row in the users table
- read: takes a userid as input, retrieves the row from the users table which matches the userid
- update: takes a user model as input, replaces the matching userid row with input data
- Delete: takes a userid as input, removes the corresponding row
Edited by Michael Bowcutt