Closed the4t4 closed 2 years ago
Also modified the database to have integer ids + fixed endpoint bugs.
Tested the new function with: curl -v -X PUT -H "Content-Type: application/json" --data '{"section": { "sectionid": 1 }, "diff": {"sectionname": "Red Dot"}}' http://localhost:5000/sections/update
curl -v -X PUT -H "Content-Type: application/json" --data '{"section": { "sectionid": 1 }, "diff": {"sectionname": "Red Dot"}}' http://localhost:5000/sections/update
[{"sectionid":1,"sectionname":"Homework","groupid":1},{"sectionid":2,"sectionname":"Progress Task","groupid":1},{"sectionid":3,"sectionname":"Homework","groupid":2},{"sectionid":4,"sectionname":"Midterm","groupid":1},{"sectionid":5,"sectionname":"Endterm","groupid":2}] -> [{"sectionid":1,"sectionname":"Red Dot","groupid":1},{"sectionid":2,"sectionname":"Progress Task","groupid":1},{"sectionid":3,"sectionname":"Homework","groupid":2},{"sectionid":4,"sectionname":"Midterm","groupid":1},{"sectionid":5,"sectionname":"Endterm","groupid":2}]
Also modified the database to have integer ids + fixed endpoint bugs.
Tested the new function with:
curl -v -X PUT -H "Content-Type: application/json" --data '{"section": { "sectionid": 1 }, "diff": {"sectionname": "Red Dot"}}' http://localhost:5000/sections/update
[{"sectionid":1,"sectionname":"Homework","groupid":1},{"sectionid":2,"sectionname":"Progress Task","groupid":1},{"sectionid":3,"sectionname":"Homework","groupid":2},{"sectionid":4,"sectionname":"Midterm","groupid":1},{"sectionid":5,"sectionname":"Endterm","groupid":2}] -> [{"sectionid":1,"sectionname":"Red Dot","groupid":1},{"sectionid":2,"sectionname":"Progress Task","groupid":1},{"sectionid":3,"sectionname":"Homework","groupid":2},{"sectionid":4,"sectionname":"Midterm","groupid":1},{"sectionid":5,"sectionname":"Endterm","groupid":2}]