refactor: remove dead /api/resources download fallback from RecommendedCard
All checks were successful
Deploy to Frontend Servers / deploy (push) Successful in 19s

This commit is contained in:
TerryM
2026-05-28 10:53:11 +08:00
parent 49f61b89f1
commit 16f3f06431

View File

@@ -1,7 +1,7 @@
import { Download, LoaderCircle } from "lucide-react";
import { Link } from "react-router-dom";
import type { Resource } from "../api";
import { assetUrl, postJSON } from "../api";
import { assetUrl } from "../api";
import { useI18n } from "../i18n";
import { useMemo, useState } from "react";
import { formatDateYmd } from "../utils/format";
@@ -105,11 +105,6 @@ export function RecommendedCard({
);
return;
}
try {
await postJSON(`/api/resources/${r.id}/download`, {});
} catch {
/* ignore */
}
await downloadFile(dl, r.title);
} catch {
/* ignore */