mirror of
https://github.com/trambarhq/relaks-wordpress-example.git
synced 2025-09-02 12:42:38 +02:00
Added fixed for errant < (issue #27).
This commit is contained in:
@@ -51,6 +51,9 @@ async function handleJSONRequest(req, res, next) {
|
||||
try {
|
||||
let path = `/wp-json/${req.url.substr(6)}`;
|
||||
let json = await JSONRetriever.fetch(path);
|
||||
if (json.total) {
|
||||
res.set({ 'X-WP-Total': json.total });
|
||||
}
|
||||
res.send(json.text);
|
||||
} catch (err) {
|
||||
next(err);
|
||||
|
Reference in New Issue
Block a user