Spaces for Purchase List
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
module.exports = async function handler(req, res) {
|
||||
res.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");
|
||||
res.setHeader("Content-Type", "application/json; charset=utf-8");
|
||||
|
||||
try {
|
||||
const response = await fetch(
|
||||
"https://spacesops.com/getspaces?app=spaces-wallet&format=json",
|
||||
{ cache: "no-store" }
|
||||
);
|
||||
const body = await response.text();
|
||||
res.status(response.status).send(body);
|
||||
} catch (error) {
|
||||
res.status(502).json({ success: false, error: "Unable to load spaces" });
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user