Skip to content

Commit ebd2dc5

Browse files
committed
Added a fake API, for my new discord integration.
1 parent a2735d7 commit ebd2dc5

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

api/peak-modding/data.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>API Data</title>
6+
<meta http-equiv="Content-Type" content="application/json">
7+
</head>
8+
<body style="margin: 0; padding: 0;">
9+
<script>
10+
const urlParams = new URLSearchParams(window.location.search);
11+
const data = {};
12+
13+
for (const [key, value] of urlParams.entries()) {
14+
data[key] = decodeURIComponent(value);
15+
}
16+
17+
document.documentElement.innerHTML = JSON.stringify(data, null, 0);
18+
19+
console.log("Serving API data for:", data.type);
20+
</script>
21+
</body>
22+
</html>

0 commit comments

Comments
 (0)