Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Commit cab6396

Browse files
authored
chore: add sandbox scripts (#141)
1 parent 205f841 commit cab6396

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

sandbox/scripts/fetch_state.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env -S deno run -A
2+
3+
const origin = Deno.env.get("OPENGB_ORIGIN");
4+
5+
const res = await fetch(`${origin}/modules/lobbies/scripts/fetch_lobby_manager_state/call`, {
6+
method: "POST",
7+
headers: {
8+
"Content-Type": "application/json",
9+
},
10+
body: JSON.stringify({}),
11+
});
12+
if (res.status != 200) {
13+
console.error(await res.text());
14+
Deno.exit(1);
15+
}
16+
17+
console.log(await res.json());
18+

sandbox/scripts/reset_state.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env -S deno run -A
2+
3+
const origin = Deno.env.get("OPENGB_ORIGIN");
4+
5+
const res = await fetch(`${origin}/modules/lobbies/scripts/reset_lobby_manager_state/call`, {
6+
method: "POST",
7+
headers: {
8+
"Content-Type": "application/json",
9+
},
10+
body: JSON.stringify({}),
11+
});
12+
if (res.status != 200) {
13+
console.error(await res.text());
14+
Deno.exit(1);
15+
}
16+
17+
console.log(await res.json());
18+

0 commit comments

Comments
 (0)