Correct API endpoint

Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
Fred Boniface 2023-01-15 20:10:04 +00:00
parent 908ded08a7
commit 4c6d66c5d9

View File

@ -37,7 +37,7 @@ async function parseData(values){
async function getData(type, value){ async function getData(type, value){
console.log(`Looking for: ${type} ${value}`) console.log(`Looking for: ${type} ${value}`)
try { try {
var url = `${window.location.origin}/api/v1/${type}/${value}`; var url = `${window.location.origin}/api/v1/find/${type}/${value}`;
var resp = await fetch(url); var resp = await fetch(url);
console.log(`Response: ${resp.json}`) console.log(`Response: ${resp.json}`)
return await resp.json() return await resp.json()