Profile Router - adamstelle/abba GitHub Wiki
POST /api/profile
This route allows users to create a profile.
Expected Headers
{ "x-powered-by": "Express",
"content-type": "application/json; charset=utf-8",
"content-length": "176",
"etag": "W/'b0-oLrFRjOfGXnGCWvWsEZI+g'",
"date": "Thu, 13 Oct 2016 22:13:54 GMT",
"connection": "close"
}
Expected Body
{ "__v": 0,
"firstName": "abba",
"lastName": "team",
"phone": 4255555555,
"email": "[email protected]",
"status": "owner",
"userID": "580003ac8a1f46c104edc81e",
"_id": "580003ac8a1f46c104edc81f" }
GET, PUT, DELETE /api/profile/:profID
This route allows users to read, update, or delete their profile.
Expected Headers
{ "x-powered-by": "Express",
"content-type": "application/json; charset=utf-8",
"content-length": "189",
"etag": "W/'bd-B/K69yxUsviVVDdVQo8Akw'",
"date": "Thu, 13 Oct 2016 22:01:21 GMT",
"connection": "close" }
Expected Body
{ "_id": "58000431ca5970c12c6c84fd",
"firstName": "abba",
"lastName": "team",
"phone": 4255555555,
"email": "[email protected]",
"status": "owner",
"userID": "58000431ca5970c12c6c84fc",
"__v": 0 }
POST /api/profile/:profID/photo
This route allows users to upload a profile picture.
Expected Headers
{ "x-powered-by": "Express",
"content-type": "application/json; charset=utf-8",
"content-length": "303",
"etag": "W/'12f-slasSTYQ6zodlmyd8rDeew'",
"date": "Thu, 13 Oct 2016 22:26:25 GMT",
"connection": "close" }
Expected Body
{ "__v": 0,
"name": "whidbey",
"caption": "beautiful property with a view",
"objectKey": "cb2d73360c93555fb407a2108e812bb9",
"imageURI": "https://cf401demo.s3.amazonaws.com/cb2d73360c93555fb407a2108e812bb9",
"userID": "58000a1108f384c1da72baa8",
"_id": "58000a1108f384c1da72baaa",
"created": "2016-10-13T22:26:25.337Z" }
DELETE /api/profile/:profID/photo/:id
This route allows users to delete a profile picture.
Expected Headers
{ "x-powered-by": "Express",
"etag": "W/'a-oQDOV50e1MN2H/N8GYi+8w'",
"date": "Thu, 13 Oct 2016 22:28:17 GMT",
"connection": "close" }