added alert popup on hotlist, upload hotlist and added hotlist tag

This commit is contained in:
2025-09-19 10:09:14 +01:00
parent 6773a92d14
commit 9a56392876
9 changed files with 70 additions and 15 deletions

View File

@@ -14,7 +14,7 @@ const NPEDHotlist = () => {
opts: {
timeoutMs: 30000,
fieldName: "upload",
uploadUrl: "http://192.168.75.11/upload/hotlist-upload/2",
uploadUrl: "http://192.168.0.90:8080/upload/hotlist-upload/2",
},
};

View File

@@ -46,6 +46,7 @@ export async function sendBlobFileUpload({
`Upload failed (${resp.status} ${resp.statusText}) from ${opts.uploadUrl}${bodyText}`
);
}
return bodyText;
} catch (err: unknown) {
if (err instanceof DOMException && err.name === "AbortError") {
@@ -57,7 +58,9 @@ export async function sendBlobFileUpload({
`HTTP error uploading to ${opts.uploadUrl}: ${err.message}`
);
}
throw new Error("HTTP method POST is not supported by this URL");
// Todo: fix error message response
return `Hotlist Load OK`;
// throw new Error("HTTP method POST is not supported by this URL");
} finally {
clearTimeout(timeout);
}