more news

main
Brett 2025-07-08 22:11:28 -04:00
parent d534ce6a07
commit 12bf471068
4 changed files with 4 additions and 4 deletions

View File

@ -124,7 +124,7 @@
toggleLoader(true);
try{
const url = new URL('/api/articles', window.location.origin);
const url = new URL('/news/api/articles', window.location.origin);
if (lastId !== undefined) url.searchParams.set('last', lastId);
url.searchParams.set("count", "5")

View File

@ -115,7 +115,7 @@
const errorEl = document.getElementById('error');
// Change this to the full path of your API if it differs
const ENDPOINT = '/api/articles?count=25';
const ENDPOINT = '/news/api/articles?count=25';
fetch(ENDPOINT)
.then(res => {

View File

@ -230,7 +230,7 @@
toggleLoader(true);
try{
const url = new URL('/api/search', window.location.origin);
const url = new URL('/news/api/search', window.location.origin);
url.searchParams.set('text', currentQuery);
url.searchParams.set('count', PAGE_SIZE);
if (lastId !== undefined) url.searchParams.set('last', lastId);

View File

@ -218,7 +218,7 @@
(function main(){
const qs = new URLSearchParams(window.location.search);
const url = qs.get('url');
const API = '/api/view_article?url=' + encodeURIComponent(url ?? '');
const API = '/news/api/view_article?url=' + encodeURIComponent(url ?? '');
const elTopics = document.getElementById('topics');
const elSummary = document.getElementById('summary');