mirror of
https://github.com/skidoodle/erettsegi-browser.git
synced 2026-04-28 13:37:35 +02:00
huge update (pls dont break)
This commit is contained in:
@@ -18,7 +18,10 @@ const ResourceComponent = ({ label, link }: ResourceProps) => {
|
||||
if (link) {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const response = await fetch(`/api/validate?link=${encodeURI(link)}`);
|
||||
|
||||
const validateUrl = link.replace("/proxy/", "/validate/");
|
||||
|
||||
const response = await fetch(validateUrl);
|
||||
const data = (await response.json()) as { status: number };
|
||||
setStatus(data.status);
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user