a
This commit is contained in:
parent
42a6eefa48
commit
259eb7e02b
@ -126,7 +126,6 @@ const extraControllers = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
deleteInscription: async (req, res, next) => {
|
deleteInscription: async (req, res, next) => {
|
||||||
const params = extractParamsFromRequest(req, res, {});
|
const params = extractParamsFromRequest(req, res, {});
|
||||||
const user = req.user;
|
const user = req.user;
|
||||||
|
|||||||
@ -321,6 +321,11 @@ routes.get('/admin/events/:id/partners',
|
|||||||
eventController.findPartners,
|
eventController.findPartners,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
routes.get('/admin/events/:eventId/partners/:entityId/reservations',
|
||||||
|
// isAdministratorUser,
|
||||||
|
eventReservationController.find(),
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
routes.post('/admin/reservations',
|
routes.post('/admin/reservations',
|
||||||
// isAdministratorUser,
|
// isAdministratorUser,
|
||||||
|
|||||||
@ -72,7 +72,7 @@ module.exports = function (sequelize, DataTypes) {
|
|||||||
|
|
||||||
EventInscription.associate = function (models) {
|
EventInscription.associate = function (models) {
|
||||||
EventInscription.Event = EventInscription.belongsTo(models.Event, { foreignKey: 'eventId', as: 'event' });
|
EventInscription.Event = EventInscription.belongsTo(models.Event, { foreignKey: 'eventId', as: 'event' });
|
||||||
EventInscription.Reservation = EventInscription.belongsTo(models.EventReservation, { foreignKey: 'reservationId', as: 'reservation', onDelete: 'set null' });
|
EventInscription.Reservation = EventInscription.belongsTo(models.EventReservation, { foreignKey: 'reservationId', as: 'reservation'});
|
||||||
EventInscription.User = EventInscription.belongsTo(models.User, { foreignKey: 'userId', as: 'user' });
|
EventInscription.User = EventInscription.belongsTo(models.User, { foreignKey: 'userId', as: 'user' });
|
||||||
EventInscription.UserValidate = EventInscription.belongsTo(models.User, { foreignKey: 'validateUserId' });
|
EventInscription.UserValidate = EventInscription.belongsTo(models.User, { foreignKey: 'validateUserId' });
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user