added todos
This commit is contained in:
		@@ -74,13 +74,13 @@ function navigateToAdd() {
 | 
				
			|||||||
function filter(filterString) {
 | 
					function filter(filterString) {
 | 
				
			||||||
    filterString = filterString.toUpperCase();
 | 
					    filterString = filterString.toUpperCase();
 | 
				
			||||||
    const fetchURL = baseURL + "?type=" + encodeURIComponent(filterString) + "&size=" + defaultPagingValue;
 | 
					    const fetchURL = baseURL + "?type=" + encodeURIComponent(filterString) + "&size=" + defaultPagingValue;
 | 
				
			||||||
    console.log(fetchURL)
 | 
					    console.log(fetchURL); // TODO: remove
 | 
				
			||||||
    fetchQuery(fetchURL);
 | 
					    fetchQuery(fetchURL);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function search(searchString) {
 | 
					function search(searchString) {
 | 
				
			||||||
    const fetchURL = baseURL + "/search" + "?search=" + encodeURIComponent(searchString.length === 0?"%":searchString);
 | 
					    const fetchURL = baseURL + "/search" + "?search=" + encodeURIComponent(searchString.length === 0?"%":searchString);
 | 
				
			||||||
    console.log(fetchURL);
 | 
					    console.log(fetchURL); // TODO: remove
 | 
				
			||||||
    fetchQuery(fetchURL);
 | 
					    fetchQuery(fetchURL);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -92,12 +92,12 @@ function sort(sortString) {
 | 
				
			|||||||
        query[1] = "desc";
 | 
					        query[1] = "desc";
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    const fetchURL = baseURL + "?sort=" + query[0] + "&direction=" + query[1];
 | 
					    const fetchURL = baseURL + "?sort=" + query[0] + "&direction=" + query[1];
 | 
				
			||||||
    console.log(fetchURL);
 | 
					    console.log(fetchURL); // TODO: remove
 | 
				
			||||||
    fetchQuery(fetchURL);
 | 
					    fetchQuery(fetchURL);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function vote(entryID, up) {
 | 
					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");
 | 
					    fetch(baseURL + "/id/" + entryID + "/" + up?"upvote":"downvote");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,7 @@
 | 
				
			|||||||
    <script type="module"  src="main.js" defer></script>
 | 
					    <script type="module"  src="main.js" defer></script>
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
<body>
 | 
					<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>
 | 
					    <main>
 | 
				
			||||||
        <header>
 | 
					        <header>
 | 
				
			||||||
            <h1>Welcome to DataDash</h1>
 | 
					            <h1>Welcome to DataDash</h1>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user