method:post
path:/user/signup
Expects an object { username , password }
properties and their values.
ex:
`{ username: "dennis", password: "is cool" }`
method:post
path:/user/login
Expects an object with username and password properties and their values.
example:
`{ username: "dennis", password: "is cool" }`
It will return set a cookie equal to the session Id and send back an object with property success.
ex:
passwords match:
`{ message: true }`
passwords dont match:
`{ message: false }`
method:Post
path:/items/addItem
expects an object such as :
{"title":"desc",
"category":"book",
"description":"whatever",
"price":333,
"fd": "find out later",
"likes":20,
"seller":"dennis"}
any information missing or empty strings from any of these properties will return an error and not add an item to the database
method:Post
path:/items/removeItem
expect an object such as:
{itemId:"123124129"}
method:get
path:/items/getItems
this returns an object. the property with the results is "results" and contains all the information about the object including id
example response:
{
"results": [
{
"_id": "5c630b729b48804d3c12a7f0",
"title": "desc",
"category": "book",
"description": "whatever",
"price": 333,
"fd": "find out later",
"likes": 20,
"seller": "dennis"
}
],
"success": true
}