Meeting notes changes

The query did not work before this fix, there is still a bug I need to fix
and I am aware of it. The bug is the first time I log in and click on
meeting to add/edit notes, it does not find the note, I have to relogin and
then it finds the existing note consistently, I am working on it.

Thanks,
Medha

On Thu, Sep 11, 2014 at 11:02 AM, athahar <notifications@github.com> wrote:

> In controllers/meeting-notes/index.js:
>
> > -        } else {
> > -            res.render('meeting-notes/index', model);
> > +
> > +      	debugger;
> > +        if (req.session.user._id) {
> > +            model.data = model.data || {};
> > +            model.data.meetingId = req.query.meetingId;
> > +            model.data.userId = req.session.user._id;
> > +            MeetingNotes.findByUserAndMeetingId(req.session.user._id, req.query.meetingId, function (err, meetingnotesrec) {
> > +
> > +                // console.log('111aaa');
> > +                if (err) {
> > +                    callback(err);
> > +
> > +                }
> > +                meetingnotesrec = meetingnotesrec[0].toJSON();
>
> I guess meetingnotesrec[0] is already a JSON.?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/athahar/ScholarMatch/pull/18/files#r17437067>.
>