mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
closes #114. updated ajaxify to allow for get parameters to be passed in without issues.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user