Closed jordan-castelloe closed 6 years ago
This fixes Issue #7 , which asks for GET, POST, AND PUT on the Departments resource. (We don't need a delete function for this one!)
Fixes #7
This PR should provide post and put functionality for the Departments Resource
npm start
POST
http://localhost:8080/api/v1/departments
{ "supervisor_id": 1, "expense_budget": 10000, "name": "woohoo!" }
http://localhost:8080/api/v1/departments/10
PUT
http://localhost:8080/api/v1/departments/1
testing
Description
This fixes Issue #7 , which asks for GET, POST, AND PUT on the Departments resource. (We don't need a delete function for this one!)
Number of Fixes
Fixes #7
Problem to Solve
This PR should provide post and put functionality for the Departments Resource
Expected Behavior
Steps to Test Solution
npm start
in your terminalPOST
http://localhost:8080/api/v1/departments
into Postman and set it to POST{ "supervisor_id": 1, "expense_budget": 10000, "name": "woohoo!" }
http://localhost:8080/api/v1/departments/10
and you should see the data you just posted.PUT
http://localhost:8080/api/v1/departments/1
into Postman and set it to PUT{ "supervisor_id": 1, "expense_budget": 10000, "name": "woohoo!" }
http://localhost:8080/api/v1/departments/1
and you should see the data you just posted.