Moved eveything related to the api to a seperate folder seasoned_api.
This commit is contained in:
14
seasoned_api/src/webserver/controllers/plex/plexPlaying.js
Normal file
14
seasoned_api/src/webserver/controllers/plex/plexPlaying.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const PlexRepository = require('src/plex/plexRepository');
|
||||
const plexRepository = new PlexRepository();
|
||||
|
||||
function playingController(req, res) {
|
||||
plexRepository.nowPlaying()
|
||||
.then((movies) => {
|
||||
res.send(movies);
|
||||
})
|
||||
.catch((error) => {
|
||||
res.status(500).send({success: false, error: error.message });
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = playingController;
|
||||
Reference in New Issue
Block a user