So I have the following route:
app.delete('/project/:id', crud.deleteProject);
app.delete('/project/resource/', crud.removeResourceFromProject);
When I run the ajax call with the url http://mysite.no/project/resource/
:
delete: function(url,data) {
return $.ajax({
url: url,
type: "DELETE",
dataType: 'json',
data: data
});
Express runs the crud.deleteProject
function.
If I comment out or move it below the other route, it works as expected.
Why is this?