fix: multiple tags issue
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user