This commit is contained in:
David Arranz 2019-08-30 20:04:21 +02:00
parent dde393649b
commit 7e6c644a35
2 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ const extraControllers = {
const userId = req.user.id;
var result = null;
console.log(params);
console.log(params, req.user.level);
if (eventId) {
try {
if (req.user.level = 8)

View File

@ -46,7 +46,7 @@ const extraMethods = {
},
_getInscriptionByEventAndUser: (eventId, userId) => {
return models.EventInscription.scope(['includeEventAndVenue', 'includeReservation']).findOne({
return models.EventInscription.scope(['includeEventAndVenue']).findOne({
where: {
eventId: eventId,
userId: userId
@ -64,7 +64,7 @@ const extraMethods = {
},
_getInscriptionsUser: (userId) => {
return models.EventInscription.scope('includeEventAndVenue').findAll({
return models.EventInscription.scope('includeEventAndVenue', 'includeReservation').findAll({
attributes: {
exclude: ['marketing_memberId', 'overflowEventId', 'createdAt', 'updatedAt', 'userId', 'eventId', 'validateUserId']
},