apidoc
This commit is contained in:
parent
350b49a810
commit
c3c57cf188
File diff suppressed because one or more lines are too long
@ -5,15 +5,15 @@
|
|||||||
<meta name="description" content="Descripción de la API de MiProyecto">
|
<meta name="description" content="Descripción de la API de MiProyecto">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
<link href="assets/bootstrap.min.css?v=1725450488722" rel="stylesheet" media="screen">
|
<link href="assets/bootstrap.min.css?v=1725450717953" rel="stylesheet" media="screen">
|
||||||
<link href="assets/prism.css?v=1725450488722" rel="stylesheet" />
|
<link href="assets/prism.css?v=1725450717953" rel="stylesheet" />
|
||||||
<link href="assets/prism-toolbar.css?v=1725450488722" rel="stylesheet" />
|
<link href="assets/prism-toolbar.css?v=1725450717953" rel="stylesheet" />
|
||||||
<link href="assets/prism-diff-highlight.css?v=1725450488722" rel="stylesheet" />
|
<link href="assets/prism-diff-highlight.css?v=1725450717953" rel="stylesheet" />
|
||||||
<link href="assets/main.css?v=1725450488722" rel="stylesheet" media="screen, print">
|
<link href="assets/main.css?v=1725450717953" rel="stylesheet" media="screen, print">
|
||||||
<link href="assets/favicon.ico?v=1725450488722" rel="icon" type="image/x-icon">
|
<link href="assets/favicon.ico?v=1725450717953" rel="icon" type="image/x-icon">
|
||||||
<link href="assets/apple-touch-icon.png?v=1725450488722" rel="apple-touch-icon" sizes="180x180">
|
<link href="assets/apple-touch-icon.png?v=1725450717953" rel="apple-touch-icon" sizes="180x180">
|
||||||
<link href="assets/favicon-32x32.png?v=1725450488722" rel="icon" type="image/png" sizes="32x32">
|
<link href="assets/favicon-32x32.png?v=1725450717953" rel="icon" type="image/png" sizes="32x32">
|
||||||
<link href="assets/favicon-16x16.png?v=1725450488722" rel="icon" type="image/png" sizes="16x16">
|
<link href="assets/favicon-16x16.png?v=1725450717953" rel="icon" type="image/png" sizes="16x16">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="container-fluid">
|
<body class="container-fluid">
|
||||||
@ -1042,6 +1042,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="assets/main.bundle.js?v=1725450488722"></script>
|
<script src="assets/main.bundle.js?v=1725450717953"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -49,7 +49,7 @@ const generalInvalidFields = [
|
|||||||
"locationId",
|
"locationId",
|
||||||
"sold_out",
|
"sold_out",
|
||||||
"level",
|
"level",
|
||||||
];
|
];
|
||||||
|
|
||||||
const eventDetailsFields = [
|
const eventDetailsFields = [
|
||||||
"id",
|
"id",
|
||||||
@ -60,10 +60,10 @@ const eventDetailsFields = [
|
|||||||
"campaign_text",
|
"campaign_text",
|
||||||
"init_date",
|
"init_date",
|
||||||
"end_date",
|
"end_date",
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @api {get} /web/events Obtener Eventos Disponibles
|
* @api {get} /api/v4/web/events Obtener Eventos Disponibles
|
||||||
* @apiName GetAvailableEvents
|
* @apiName GetAvailableEvents
|
||||||
* @apiGroup Eventos
|
* @apiGroup Eventos
|
||||||
* @apiVersion 4.0.0
|
* @apiVersion 4.0.0
|
||||||
@ -108,10 +108,9 @@ routes.get(
|
|||||||
|
|
||||||
(req, res, next) => {
|
(req, res, next) => {
|
||||||
const scopes = ["defaultScope", "withOpenInscriptions"];
|
const scopes = ["defaultScope", "withOpenInscriptions"];
|
||||||
res.locals.v4 = {removeFields : ["partners", "speakers", "details", "multimedias", "type"]};
|
res.locals.v4 = { removeFields: ["partners", "speakers", "details", "multimedias", "type"] };
|
||||||
return eventController.find({ scopes })(req,res,next);
|
return eventController.find({ scopes })(req, res, next);
|
||||||
}
|
}
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -163,7 +162,18 @@ routes.get(
|
|||||||
}),
|
}),
|
||||||
(req, res, next) => {
|
(req, res, next) => {
|
||||||
const scopes = ["defaultScope"];
|
const scopes = ["defaultScope"];
|
||||||
res.locals.v4 = {removeFields : ["partners", "speakers", "details", "multimedias", "type", "sold_out", "init_available_date", "end_available_date"]};
|
res.locals.v4 = {
|
||||||
|
removeFields: [
|
||||||
|
"partners",
|
||||||
|
"speakers",
|
||||||
|
"details",
|
||||||
|
"multimedias",
|
||||||
|
"type",
|
||||||
|
"sold_out",
|
||||||
|
"init_available_date",
|
||||||
|
"end_available_date",
|
||||||
|
],
|
||||||
|
};
|
||||||
return eventController.findOne({ scopes })(req, res, next);
|
return eventController.findOne({ scopes })(req, res, next);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -193,14 +203,24 @@ routes.get(
|
|||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
routes.get("/web/events/:id/check_capacity",
|
routes.get(
|
||||||
|
"/web/events/:id/check_capacity",
|
||||||
isAPIKeyUser,
|
isAPIKeyUser,
|
||||||
FieldMiddleware.middleware({
|
FieldMiddleware.middleware({
|
||||||
invalidFields: generalInvalidFields,
|
invalidFields: generalInvalidFields,
|
||||||
}),
|
}),
|
||||||
(req, res, next) => {
|
(req, res, next) => {
|
||||||
res.locals.v4 = {removeFields : ["assistants", "confirmed", "sold_out", "assistants_overflow", "confirmed_overflow", "sold_out_overflow"]};
|
res.locals.v4 = {
|
||||||
return eventController.checkCapacity(req, res, next);
|
removeFields: [
|
||||||
|
"assistants",
|
||||||
|
"confirmed",
|
||||||
|
"sold_out",
|
||||||
|
"assistants_overflow",
|
||||||
|
"confirmed_overflow",
|
||||||
|
"sold_out_overflow",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
return eventController.checkCapacity(req, res, next);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -330,7 +350,20 @@ routes.post(
|
|||||||
eventReservationController.activeReservationToEntity,
|
eventReservationController.activeReservationToEntity,
|
||||||
|
|
||||||
(req, res, next) => {
|
(req, res, next) => {
|
||||||
res.locals.v4 = {removeFields : ["reservation", "id", "eventId", "date", "userId", "source", "reservationId", "overflowEventId", "updatedAt", "createdAt"]};
|
res.locals.v4 = {
|
||||||
|
removeFields: [
|
||||||
|
"reservation",
|
||||||
|
"id",
|
||||||
|
"eventId",
|
||||||
|
"date",
|
||||||
|
"userId",
|
||||||
|
"source",
|
||||||
|
"reservationId",
|
||||||
|
"overflowEventId",
|
||||||
|
"updatedAt",
|
||||||
|
"createdAt",
|
||||||
|
],
|
||||||
|
};
|
||||||
if (res.locals.dataInscription.reservation) {
|
if (res.locals.dataInscription.reservation) {
|
||||||
console.log(">>>>>>>Incripcion con reserva");
|
console.log(">>>>>>>Incripcion con reserva");
|
||||||
eventReservationController.createInscriptionReservation(req, res, next);
|
eventReservationController.createInscriptionReservation(req, res, next);
|
||||||
@ -343,7 +376,6 @@ routes.post(
|
|||||||
// eventInscriptionController.createInscriptionMarketingList
|
// eventInscriptionController.createInscriptionMarketingList
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @api {get} /api/v4/web/events/:id/inscriptions/:email Comprobar Inscripción
|
* @api {get} /api/v4/web/events/:id/inscriptions/:email Comprobar Inscripción
|
||||||
* @apiName CheckInscription
|
* @apiName CheckInscription
|
||||||
@ -369,11 +401,7 @@ routes.post(
|
|||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
// Comprobar si estoy inscrito al congreso por la web
|
// Comprobar si estoy inscrito al congreso por la web
|
||||||
routes.get(
|
routes.get("/web/events/:id/inscriptions/:email", isAPIKeyUser, eventInscriptionController.checkInscriptionByMail);
|
||||||
"/web/events/:id/inscriptions/:email",
|
|
||||||
isAPIKeyUser,
|
|
||||||
eventInscriptionController.checkInscriptionByMail);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @api {get} /api/v4/web/entities/colleges Lista de Entidades Educativas
|
* @api {get} /api/v4/web/entities/colleges Lista de Entidades Educativas
|
||||||
@ -385,7 +413,7 @@ routes.get(
|
|||||||
* @apiSuccess {Object[]} colleges Lista de entidades educativas.
|
* @apiSuccess {Object[]} colleges Lista de entidades educativas.
|
||||||
* @apiSuccess {String} colleges.id Identificador único de la entidad educativa.
|
* @apiSuccess {String} colleges.id Identificador único de la entidad educativa.
|
||||||
* @apiSuccess {String} colleges.name Nombre de la entidad educativa.
|
* @apiSuccess {String} colleges.name Nombre de la entidad educativa.
|
||||||
* @apiSuccess {String} colleges.country Código de país de la entidad educativa.
|
* @apiSuccess {String} colleges.country Código de país de la entidad educativa.
|
||||||
*
|
*
|
||||||
* @apiSuccessExample {json} Ejemplo de Respuesta:
|
* @apiSuccessExample {json} Ejemplo de Respuesta:
|
||||||
* [
|
* [
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user