From ab5b29d3998b30fcc7c07383fe12505046f42f01 Mon Sep 17 00:00:00 2001 From: David Arranz Date: Wed, 4 Sep 2024 13:33:28 +0200 Subject: [PATCH] . --- modules/events/event.routes.v4.js | 49 +++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/modules/events/event.routes.v4.js b/modules/events/event.routes.v4.js index a4e517e..fa2dd32 100644 --- a/modules/events/event.routes.v4.js +++ b/modules/events/event.routes.v4.js @@ -146,10 +146,10 @@ routes.get( * "campaign_text": "", * "init_date": "2024-08-29T00:00:00.000Z", * "end_date": "2024-12-01T14:30:00.000Z", - * "location": { - * "country": "España", - * "city": "Madrid", - * "country_code": "ES" + * "location": { + * "country": "España", + * "city": "Madrid", + * "country_code": "ES" * }, * } */ @@ -176,7 +176,7 @@ routes.get( * @apiDescription Determina si hay aforo suficiente para el tamaño de grupo que se ha indicado. * * @apiParam {String} id ID único del evento. - * @apiParam {Number} group_size número de entradas solicitadas para evento el evento. + * @apiParam {Number} [group_size=10] Tamaño del grupo para el cual se verifica el aforo (Parámetro de consulta). * * @apiSuccess {String} eventId ID único del evento. * @apiSuccess {Number} group_size Tamaño del grupo para el cual se verifica el aforo. @@ -343,6 +343,38 @@ routes.post( // eventInscriptionController.createInscriptionMarketingList ); + +/** + * @api {get} /api/v4/web/events/:id/inscriptions/:email Comprobar Inscripción + * @apiName CheckInscription + * @apiGroup Inscriptions + * @apiVersion 1.0.0 + * @apiDescription Este endpoint verifica si el correo electrónico proporcionado tiene una inscripción para el evento concreto. + * + * @apiParam {String} id Identificador único del evento. + * @apiParam {String} email Correo electrónico a comprobar. + * + * @apiSuccess {String} message Mensaje que indica el estado de la inscripción. + * @apiSuccessExample {json} Ejemplo de Respuesta Exitosa: + * HTTP/1.1 200 OK + * { + * "message": "Inscripción confirmada" + * } + * + * @apiError (Error 404) NotFound No hay inscripción con el correo electrónico proporcionado. + * @apiErrorExample {json} Ejemplo de Respuesta Fallida: + * HTTP/1.1 404 Not Found + * { + * "message": "No hay inscripción con ese email" + * } + */ +// Comprobar si estoy inscrito al congreso por la web +routes.get( + "/web/events/:id/inscriptions/:email", + isAPIKeyUser, + eventInscriptionController.checkInscriptionByMail); + + /** * @api {get} /api/v4/web/entities/colleges Lista de Entidades Educativas * @apiName GetColleges @@ -439,11 +471,4 @@ routes.get( }) ); -// Comprobar si estoy inscrito al congreso por la web -routes.get( - "/web/events/:id/inscriptions/:email", - isAPIKeyUser, - eventInscriptionController.checkInscriptionByMail); - - module.exports = routes;