Skip to content

Commit

Permalink
add info to guide
Browse files Browse the repository at this point in the history
  • Loading branch information
tombertrand committed Jan 19, 2024
1 parent b51d0c1 commit cb864d1
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 124 deletions.
54 changes: 27 additions & 27 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,33 +280,33 @@ app.get("/api/participants", async (req, res) => {
res.send(data);
});

app.get("/api/nanoquakejs/scores", async (req, res) => {
let json = {};
try {
const res = await fetch("https://rainstorm.city/nanoquake/scores");
json = await res.json();
} catch (err) {
Sentry.captureException(err);
}

res.send(json);
});

app.post("/api/nanoquakejs/register", async (req, res, next) => {
try {
const response = await fetch("https://rainstorm.city/nanoquake/register", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(req.body),
});
const json = await response.json();
res.send(json);
} catch (err) {
next(err);
}
});
// app.get("/api/nanoquakejs/scores", async (req, res) => {
// let json = {};
// try {
// const res = await fetch("https://rainstorm.city/nanoquake/scores");
// json = await res.json();
// } catch (err) {
// Sentry.captureException(err);
// }

// res.send(json);
// });

// app.post("/api/nanoquakejs/register", async (req, res, next) => {
// try {
// const response = await fetch("https://rainstorm.city/nanoquake/register", {
// method: "POST",
// headers: {
// "Content-Type": "application/json",
// },
// body: JSON.stringify(req.body),
// });
// const json = await response.json();
// res.send(json);
// } catch (err) {
// next(err);
// }
// });

app.get("/api/nanobrowserquest/players", async (req, res, next) => {
try {
Expand Down
2 changes: 0 additions & 2 deletions src/api/contexts/MarketStatistics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ const Provider: React.FC<Props> = ({ children }) => {
const res = await fetch(`/api/market-statistics${query}`);
const json = await res.json();

console.log("~~~~/api/market-statisticsjson", json);

if (!json || json.error) {
isError = true;
} else {
Expand Down
Loading

0 comments on commit cb864d1

Please sign in to comment.