Skip to content

Commit

Permalink
Adding example for controller returning database query result
Browse files Browse the repository at this point in the history
  • Loading branch information
danielve4 committed Apr 21, 2019
1 parent 7bb2b4c commit e698c5e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions webserver/controllers/music.js
@@ -1,9 +1,12 @@
const musicModel = require('../model/music');

exports.genres = (req, res, next) => {
res.send('Hello from music genres!');
}

exports.artists = (req, res, next) => {
res.send('Hello from music artists!');
exports.artists = async (req, res, next) => {
const artistArray = await musicModel.artists();
res.send(artistArray);
}

exports.concerts = (req, res, next) => {
Expand Down

0 comments on commit e698c5e

Please sign in to comment.