added todos

This commit is contained in:
J-Klinke 2024-06-21 11:07:49 +02:00
parent d444be4381
commit cd7bfc0370
2 changed files with 5 additions and 5 deletions

View File

@ -74,13 +74,13 @@ function navigateToAdd() {
function filter(filterString) {
filterString = filterString.toUpperCase();
const fetchURL = baseURL + "?type=" + encodeURIComponent(filterString) + "&size=" + defaultPagingValue;
console.log(fetchURL)
console.log(fetchURL); // TODO: remove
fetchQuery(fetchURL);
}
function search(searchString) {
const fetchURL = baseURL + "/search" + "?search=" + encodeURIComponent(searchString.length === 0?"%":searchString);
console.log(fetchURL);
console.log(fetchURL); // TODO: remove
fetchQuery(fetchURL);
}
@ -92,12 +92,12 @@ function sort(sortString) {
query[1] = "desc";
}
const fetchURL = baseURL + "?sort=" + query[0] + "&direction=" + query[1];
console.log(fetchURL);
console.log(fetchURL); // TODO: remove
fetchQuery(fetchURL);
}
function vote(entryID, up) {
console.log(baseURL + "/id/" + entryID + "/" + (up?"upvote":"downvote"));
console.log(baseURL + "/id/" + entryID + "/" + (up?"upvote":"downvote")); // TODO: remove
fetch(baseURL + "/id/" + entryID + "/" + up?"upvote":"downvote");
}

View File

@ -8,7 +8,7 @@
<script type="module" src="main.js" defer></script>
</head>
<body>
<div onclick="console.log('add')" id="add-btn" title="Add a new API entry"></div>
<div id="add-btn" title="Add a new API entry"></div>
<main>
<header>
<h1>Welcome to DataDash</h1>