From 45a5330539019d9aa34f9bfaef140a0f45e8fb3c Mon Sep 17 00:00:00 2001 From: David Arranz Date: Thu, 7 Nov 2024 19:08:10 +0100 Subject: [PATCH] . --- modules/events/events_inscriptions.controller.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/events/events_inscriptions.controller.js b/modules/events/events_inscriptions.controller.js index 5ef4b54..767cfbc 100644 --- a/modules/events/events_inscriptions.controller.js +++ b/modules/events/events_inscriptions.controller.js @@ -236,6 +236,19 @@ const extraControllers = { }; } + //MAPEO SALIDA API4 + //Tratamos resultado, si hay que remover campos para API4 web + if (res.locals.v4){ + const arrayFieldsremove = res.locals.v4.removeFields; + inscription.rows.map((row)=>{ + arrayFieldsremove.forEach(campo => { + if (campo in row) { + delete row[campo]; + } + }); + }); + }; + console.log(">>>>>>>voy a dar inscription", inscription); return handleResultResponse(inscription, null, params, res, httpStatus.OK); } catch (error) {