Closed LouisLoode closed 8 years ago
I take it "closed" means you figured it out? If not, I think the issue may be here:
} catch (error) {
// console.log(error);
return boom.wrap(error, 400);
}
The response is never written, leaving the request to hang.
Hi, First, thanks for the awesome package, i just begin to use it. I make separation between routes, controllers and my handlers. All my GET routes of my crud works fine, but when i want to make validation on my POST and my PUT routes, it doesn't work. If i comment validate{}, in my route, it works. I think it's joi. But in the top of my file i have:
You can see a simple exemple of the skeleton of my API. The real project have a complete CRUD, if you want to see it, i can share the other pages. I separate my routes definitions in 3 parts, the route.js file :
The controller:
The handler
You can see screen if you want but i don't have a lot of other informations: With validate in my controller (just loading long time and show this):
When i comment validate in my controller:
It doesn't works for body validate not for params, and i didn't test for headers. I expose POST route but it's exactly the same for my PUT route.
Thanks for your help