From 6069793553902c33efeeb49f62b2007b48e8b1b8 Mon Sep 17 00:00:00 2001 From: Archer_cdm Date: Wed, 23 Nov 2022 16:08:32 +0800 Subject: [PATCH] =?UTF-8?q?=EF=BC=88*=EF=BC=89=E5=B0=86=E5=B9=B4=E6=9C=88?= =?UTF-8?q?=E6=8B=BC=E6=8E=A5=E8=BF=94=E5=9B=9E=E7=BB=99=E5=89=8D=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/report/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/api/app/lib/controllers/report/index.js b/api/app/lib/controllers/report/index.js index 53c9547..5562e2f 100644 --- a/api/app/lib/controllers/report/index.js +++ b/api/app/lib/controllers/report/index.js @@ -9,8 +9,16 @@ async function getReserveItemReport(ctx, next) { order: [['year', 'DESC'], ['month', 'DESC']], where: { type: type } }) + let newReportData = rslt.map(e => { + return { + id: e.id, + date: e.year + '-' + e.month, + path: e.path, + type: e.type + } + }) ctx.status = 200 - ctx.body = rslt + ctx.body = newReportData } catch (error) { ctx.fs.logger.error(`path:${ctx.path},error:${error}`) ctx.status = 400;