diff options
Diffstat (limited to 'www/scripts/blog.js')
| -rw-r--r-- | www/scripts/blog.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/www/scripts/blog.js b/www/scripts/blog.js index 1cf6657..767d1f0 100644 --- a/www/scripts/blog.js +++ b/www/scripts/blog.js @@ -1,8 +1,10 @@ var evaluatedTags = ""; const clamp = (val, min, max) => Math.min(Math.max(val, min), max) +const api_url = "https://backend.altafcreator.com" + function postList(n = 0) { - fetch("/data/posts.json") + fetch(`${api_url}/api/blogs/`) .then((response) => response.json()) .then((data) => { n = clamp(n, 0, data.posts.length); |
