diff --git a/server/controllers/routes/user/cohort/getCohortsData.js b/server/controllers/routes/user/cohort/getCohortsData.js index e4e35ded..6f49917d 100644 --- a/server/controllers/routes/user/cohort/getCohortsData.js +++ b/server/controllers/routes/user/cohort/getCohortsData.js @@ -3,8 +3,7 @@ const { getCohorts } = require('../../../../database/queries'); const getCohortsData = async (req, res, next) => { try { const { rows } = await getCohorts(); - console.log(rows); - res.json({ msg: 'test' }); + res.json({ status: 200, data: rows }); } catch (err) { next(err); } diff --git a/server/database/queries/index.js b/server/database/queries/index.js index fbd07277..9acb02c2 100644 --- a/server/database/queries/index.js +++ b/server/database/queries/index.js @@ -1,3 +1,3 @@ const { getCohorts } = require('./cohort'); -module.exporets = { getCohorts }; +module.exports = { getCohorts };