closes #114. updated ajaxify to allow for get parameters to be passed in without issues.

This commit is contained in:
psychobunny
2013-07-23 15:06:31 +08:00
parent 9e7afcf0ab
commit 6f6a2e4127
4 changed files with 19 additions and 10 deletions

View File

@@ -413,6 +413,19 @@ var express = require('express'),
}
});
break;
case 'outgoing' :
var url = req.url.split('?');
if (url[1]) {
res.json({
url: url[1],
home: global.nconf.get('url')
});
} else {
res.status(404);
res.redirect(global.nconf.get('relative_path') + '/404');
}
break;
default :
res.json(404, { error: 'unrecognized API endpoint' });
break;