Skip to content

Commit

Permalink
functions products api
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias Toussaint committed Oct 27, 2015
1 parent eabc84a commit cc2a70a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion api/functions/products.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { Product } from '../models';

function getProducts(req, res) {
res.json([{title: 'Title'}]);
res.json([{
title: 'Title',
description: 'Nike shoes',
imageUrl: 'product.jpg',
price: '125$'
}]);
}

function getProduct(req, res) {
/* pourquoi product pop en orange ? */
res.json(req.product.getPublic());
}

Expand Down

0 comments on commit cc2a70a

Please sign in to comment.