Commit 4a7c0604 authored by Elena Tsoy's avatar Elena Tsoy

#84 внесены изменения в contentlinks.js

parent c9bfcfb9
Pipeline #346 passed with stages
in 2 minutes and 11 seconds
......@@ -56,8 +56,12 @@ const createRouter = () => {
};
try {
const contentlinks = await Contentlink.find(filter).populate('user', 'surname name workEmail');;
if (process.env.NODE_ENV !== 'test') {
const contentlinksByUsers = await helpers.buildContentlinksReportExcelFile(contentlinks);
res.send(contentlinksByUsers);
}else{
res.send(contentlinks)
}
} catch (error) {
res.status(500).send(error);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment