Skip to content

Commit

Permalink
remove console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
abianco3 committed Apr 27, 2017
1 parent 57f694b commit 179fc6b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions server/controllers/artist.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ const router = require('express').Router();
const model = require('../database/queries');
const authenticate = require('../middlewares/authenticate');

//to get all artists:
// to get all artists:
router.get('/', (req, res) => {
const { limit } = req.params || 20;
model.getArtists(limit)
.then((artists) => {
console.log(artists);
res.status(200).json(artists);
})
.catch((err) => {
console.log(err);
.catch(() => {
res.status(500).json({status: 500, message: 'internal server error'});
});
});
Expand All @@ -20,7 +18,7 @@ router.get('/:artistId', (req, res) => {
let { artistId } = req.params;
const queries = [model.getArtworksOfArtist(artistId), model.getAuctionsOfArtist(artistId), model.getArtistProfile(artistId)];
Promise.all(queries)
.then(fulfilled => {
.then((fulfilled) => {
const data = {};
data.artworks = fulfilled[0];
let timeNow = new Date().getTime();
Expand Down

0 comments on commit 179fc6b

Please sign in to comment.