summaryrefslogtreecommitdiff
path: root/www/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'www/scripts')
-rw-r--r--www/scripts/blog.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/www/scripts/blog.js b/www/scripts/blog.js
index f49c5ca..0e8fa2f 100644
--- a/www/scripts/blog.js
+++ b/www/scripts/blog.js
@@ -4,7 +4,12 @@ const clamp = (val, min, max) => Math.min(Math.max(val, min), max)
const api_url = "https://altafcreator.com"
function postList(n = 0) {
- fetch(`${api_url}/api/blogs/`)
+ fetch(`${api_url}/api/blogs/`, {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ }
+ })
.then((response) => response.json())
.then((data) => {
n = clamp(n, 0, data.posts.length);