I'm currently trying to force a notFound response when certain parameters are met in sammy js:
this.get('#/projects/:url', function(){
$.ajax({
type: "POST",
url: 'package.php',
data: {
'url-verify': this.params['url']
},
success: function(data){
if(data.success)
{
this.load('page.php?='+this.params['url'])
.swap();
}
else
{
//force 404
}
}
});
});
I already have the code set up if a notFound were to be present, but the issue is how do I force a "notFound" if, in my case above, the feedback for the AJAX comes back with an error?