These are chat archives for apr15/apr15chat

May 2015
May 02 2015 03:43
hey samer - Im a little stuck on the 'get one' - I'm working on that first - here is what I'm trying to do based on the examples you found

  method: 'GET',
  path: '/tasks/' + task._id,
  handler: function (request, reply) {
    var task = new Task();

    task.find({}, function(err, task) {
        if (!err) {
        } else {
            reply(Boom.badImplementation(err)); // 500 error
so the main error is that 'task' isn't defined - which it isn't yet in the =3rd line
sorry to be lame but I am not sure how to construct this
May 02 2015 03:52
I see that task id has to be in { } now for example
Chris Oyler
May 02 2015 04:12
path: '/dogs/{dogId}'
this is an example from our work today of what that looks like, though I’m sure you have that by now
Samer Buna
May 02 2015 04:24
@tania531 you should be using findOne for this
May 02 2015 04:29
ok yes
Emile just helped me work through the approximately 10 wrong things in that snippet I sent you!
He also refused to just point it out - he made me get there haha!
thank you
now I'm working on delete!