diff --git a/js/dailyReport.js b/js/dailyReport.js index 6b5a507..982392c 100644 --- a/js/dailyReport.js +++ b/js/dailyReport.js @@ -33,7 +33,7 @@ exports.apiGetDailyReportSum=asyncHandler(async (req,res)=>{ } ]) - if (count) wtSum=count[0].count*8 + if (count.length) wtSum=count[0].count*8 res.send({'response':'ok', 'dailyReportSum':wtSum}); }catch(err){ diff --git a/views/work.pug b/views/work.pug index 4c13c4f..7bedba4 100644 --- a/views/work.pug +++ b/views/work.pug @@ -106,7 +106,7 @@ block content img(src='/pdf.jpg',align='right', width='16px', height='16px') div.col-md-5 //a(href="/cmfile/"+encodeURIComponent(work._id)+"/"+i)= file - a(href=`localhost:5000/api/db/getDocumentByPath?param=${encodeURIComponent(work.pathCM+"\\"+encodeURIComponent(work.filesCM[i]))}` target='_blank')= file + a(href=`https://cmmunkaszam.klelectro.eu/api/db/getDocumentByPath?param=${encodeURIComponent(work.pathCM+"\\"+encodeURIComponent(work.filesCM[i]))}` target='_blank')= file .panel-footer