diff options
| author | altaf-creator <dev@altafcreator.com> | 2026-05-17 13:21:00 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2026-05-17 13:21:00 +0800 |
| commit | 6426286d75ab1debb54d380e876a70dcad1dcf66 (patch) | |
| tree | c93f1f496a8c6f6b81371ba87ae7c860fd46c5ed /www | |
| parent | ba79525cc20783a7ab2f095e65400786f1850f0f (diff) | |
api/blogs should be POST
Diffstat (limited to 'www')
| -rw-r--r-- | www/scripts/blog.js | 7 |
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); |
