Use query parameter instead of path to fix wildcard subfolder issues

This commit is contained in:
DominikDoom
2023-09-26 11:55:12 +02:00
parent 460d32a4ed
commit 030a83aa4d
2 changed files with 6 additions and 6 deletions

View File

@@ -175,11 +175,11 @@ function tagBias(count, uses) {
}
// Call API endpoint to increase bias of tag in the database
function increaseUseCount(tagName, type) {
postAPI(`tacapi/v1/increase-use-count/${tagName}?ttype=${type}`, null);
postAPI(`tacapi/v1/increase-use-count?tagname=${tagName}&ttype=${type}`, null);
}
// Get use count of tag from the database
async function getUseCount(tagName, type) {
return (await fetchAPI(`tacapi/v1/get-use-count/${tagName}?ttype=${type}`, true, false))["result"];
return (await fetchAPI(`tacapi/v1/get-use-count?tagname=${tagName}&ttype=${type}`, true, false))["result"];
}
async function getUseCounts(tagNames, types) {
return (await fetchAPI(`tacapi/v1/get-use-count-list?tags=${tagNames.join("&tags=")}&ttypes=${types.join("&ttypes=")}`))["result"];
@@ -188,7 +188,7 @@ async function getAllUseCounts() {
return (await fetchAPI(`tacapi/v1/get-all-use-counts`))["result"];
}
async function resetUseCount(tagName, type) {
putAPI(`tacapi/v1/reset-use-count/${tagName}?ttype=${type}`, null);
putAPI(`tacapi/v1/reset-use-count?tagname=${tagName}&ttype=${type}`, null);
}
// Sliding window function to get possible combination groups of an array