mirror of
https://github.com/mjrode/WhatToWatch.git
synced 2026-01-06 05:29:34 -06:00
26 lines
567 B
JavaScript
26 lines
567 B
JavaScript
import plexApiClient from './plexApi';
|
|
|
|
const getUsers = async (req, res) => {
|
|
const plexApi = plexApiClient();
|
|
const users = await plexApi.getUsers();
|
|
res.json(users);
|
|
};
|
|
|
|
const getMostWatched = async (req, res) => {
|
|
const plexApi = plexApiClient();
|
|
const mostWatched = await plexApi.getMostWatched(req.query);
|
|
res.json(mostWatched);
|
|
};
|
|
|
|
const getSections = async (req, res) => {
|
|
const plexApi = plexApiClient();
|
|
const sections = await plexApi.getSections();
|
|
res.json(sections);
|
|
};
|
|
|
|
export default {
|
|
getUsers,
|
|
getMostWatched,
|
|
getSections,
|
|
};
|