fix: multiple tags issue

This commit is contained in:
fzzinchemical
2025-03-31 20:28:24 +02:00
parent fe4e6690d4
commit 2a7a172f62
2 changed files with 20 additions and 8 deletions

View File

@@ -49,13 +49,13 @@ export const postUrl = new URL(`${baseUrl}/index.php?page=dapi&s=post&q=index&js
const tagUrl = `${baseUrl}/index.php?page=dapi&s=tag&q=index`;
const commentsUrl = `${baseUrl}/index.php?page=dapi&s=comment&q=index`;
export async function requestJSON<T>(URL: string) {
const response = await requestRaw(URL);
export async function requestJSON<T>(url: string) {
const response = await requestRaw(url);
return <T> await response.json();
}
async function requestRaw(URL: string) {
const response = await fetch(URL, {
async function requestRaw(url: string) {
const response = await fetch(url, {
headers: { "Accept": "application/json" },
});
if (!response.ok) {