From 5cfd66a9da01d3a72eb5ca33da73d53b1165adc7 Mon Sep 17 00:00:00 2001 From: Jonathon Hammond Date: Thu, 10 Mar 2022 11:46:21 -0500 Subject: [PATCH] fix for api status page --- src/pages/api/status.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/pages/api/status.js diff --git a/src/pages/api/status.js b/src/pages/api/status.js new file mode 100644 index 00000000..71decdae --- /dev/null +++ b/src/pages/api/status.js @@ -0,0 +1,11 @@ +const status = async (req, res) => { + const response = await fetch('http://status.test-blockstack.com/json'); + const json = await response.json(); + if (json) { + res.statusCode = 200; + res.setHeader('Content-Type', 'application/json'); + res.end(JSON.stringify(json.blockRateStatus)); + } +}; + +export default status;