diff --git a/routes/profileRoute.ts b/routes/profileRoute.ts index c41b644..d42904c 100644 --- a/routes/profileRoute.ts +++ b/routes/profileRoute.ts @@ -12,7 +12,10 @@ profileRouter.get('/users/:username', async (req, res, next) => { .catch(next) if (streamerData) - res.send(streamerData) + res.send({ + status: 'ok', + data: streamerData + }) }) profileRouter.get('/discover', async (req, res, next) => { @@ -25,7 +28,10 @@ profileRouter.get('/discover', async (req, res, next) => { discoveryData = await twitch.getDirectory(15) } - res.send(discoveryData) + res.send({ + status: 'ok', + data: discoveryData + }) }) profileRouter.get('/discover/:game', async (req, res, next) => { @@ -33,7 +39,10 @@ profileRouter.get('/discover/:game', async (req, res, next) => { .catch(next) if(discoveryData) - res.send(discoveryData) + res.send({ + status: 'ok', + data: discoveryData + }) }) profileRouter.get('/badges', async (req, res, next) => { @@ -48,7 +57,10 @@ profileRouter.get('/badges', async (req, res, next) => { } if(badges) - res.send(badges) + res.send({ + status: 'ok', + data: badges + }) }) export default profileRouter \ No newline at end of file