diff --git a/api/models/meetingModel.js b/api/models/meetingModel.js index 049f543..85cf371 100644 --- a/api/models/meetingModel.js +++ b/api/models/meetingModel.js @@ -20,6 +20,7 @@ function addMeeting(data) { 'start_time', 'duration', 'status', + 'password', ]); } @@ -34,6 +35,7 @@ function updateMeeting(data, id) { 'start_time', 'duration', 'status', + 'password', ]); } @@ -52,6 +54,7 @@ function getMeetingById(id) { 'start_time', 'duration', 'status', + 'password', ); } @@ -59,8 +62,8 @@ function getParticipantsByMeetingId(meeting_id) { return db('participant as p') .select( 'p.id', - 'p.account_id', 'p.email', + 'p.account_id', 'p.meeting_id', 'p.quorum', 'p.mandatory', @@ -82,8 +85,7 @@ function getAvailabilityByMeetingId(meeting_id) { return db('availability as a') .select( 'a.id', - 'a.meeting_id', - 'a.account_id', + 'a.participant_id', 'a.possible_date_id', 'a.preference', 'a.start_time', diff --git a/api/models/participantModel.js b/api/models/participantModel.js index 2624846..ae5d7ce 100644 --- a/api/models/participantModel.js +++ b/api/models/participantModel.js @@ -2,10 +2,10 @@ const db = require('../../data/db'); module.exports = { addParticipant, - getParticipantById, updateParticipant, deleteParticipant, // getMeetingsByParticipantId, + // getParticipantById, }; function addParticipant(data) { @@ -14,11 +14,11 @@ function addParticipant(data) { .returning([ 'id', 'email', - 'account_id', - 'meeting_id', - 'quorum', - 'mandatory', - 'host', + 'account_id', + 'meeting_id', + 'quorum', + 'mandatory', + 'host', 'answered', ]); } @@ -30,31 +30,31 @@ function updateParticipant(data, id) { .returning([ 'id', 'email', - 'account_id', - 'meeting_id', - 'quorum', - 'mandatory', - 'host', + 'account_id', + 'meeting_id', + 'quorum', + 'mandatory', + 'host', 'answered', ]); } function deleteParticipant(id) { - return db('participant').where({id }).del(); + return db('participant').where({ id }).del(); } -function getParticipantById(id) { - return db('participant') - .where({ id }) - .first() - .select( - 'id', - 'email', - 'account_id', - 'meeting_id', - 'quorum', - 'mandatory', - 'host', - 'answered', - ); -} +// function getParticipantById(id) { +// return db('participant') +// .where({ id }) +// .first() +// .select( +// 'id', +// 'email', +// 'account_id', +// 'meeting_id', +// 'quorum', +// 'mandatory', +// 'host', +// 'answered', +// ); +// }