a
This commit is contained in:
parent
1373b3ab05
commit
ce74a5981b
@ -13,20 +13,6 @@ const citiesComposer = (city) => {
|
||||
else return city;
|
||||
}
|
||||
|
||||
const commentsComposer = (comments) => {
|
||||
if (comments) {
|
||||
return comments.map(comment => ({
|
||||
...comment,
|
||||
userId: undefined,
|
||||
user: {
|
||||
...comment.user,
|
||||
profile_picture: cdnHelper.getCDNMediaUrl(comment.user.profile_picture)
|
||||
}
|
||||
}));
|
||||
}
|
||||
else return comments;
|
||||
};
|
||||
|
||||
const commentComposer = (comment, context) => {
|
||||
|
||||
if (comment.user) {
|
||||
@ -45,6 +31,14 @@ const commentComposer = (comment, context) => {
|
||||
comment);
|
||||
};
|
||||
|
||||
const commentsComposer = (comments) => {
|
||||
if (comments) {
|
||||
return comments.map(comment => ({
|
||||
...commentComposer(comment)
|
||||
}));
|
||||
}
|
||||
else return comments;
|
||||
};
|
||||
|
||||
|
||||
const multimediaComposer = (multimedias) => {
|
||||
|
||||
@ -108,7 +108,7 @@ const extraControllers = {
|
||||
const inscription = await eventInscriptionService._getInscriptionById(inscriptionId);
|
||||
console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>><Inscripcion a borrar:');
|
||||
console.log(inscription);
|
||||
if (!inscription)
|
||||
if (!inscription || (inscription.userId !== user.id))
|
||||
return handleResultResponse("Inscription no encontrada", null, params, res, httpStatus.NOT_FOUND);
|
||||
|
||||
//Borramos inscripcion y descontamos asistentes
|
||||
|
||||
Loading…
Reference in New Issue
Block a user