Skip to content

Commit

Permalink
fixed api doc for creating item
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Gomez committed Jun 26, 2016
1 parent 72d15fc commit fbbebfe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion project/services/item.service.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = function(app, models) {


app.post ("/api/upload", upload.single('myFile'), uploadImage);
app.post("/api/user", createItem);
app.post("/api/item", createItem);
app.get("/api/user/:userId/listings", findItemsBySeller);
app.get("/api/item/:itemId", findItemById);
app.put("/api/item/:itemId", updateItem);
Expand Down
6 changes: 3 additions & 3 deletions public/services/item.service.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
};
return api;

function createItem(user) {
var url = "/api/user";
return $http.post(url, user);
function createItem(item) {
var url = "/api/item";
return $http.post(url, item);
}

function getItems() {
Expand Down

0 comments on commit fbbebfe

Please sign in to comment.