Update: admin panel fixes, badge icons, studio improvements, gitea runner v5
Gitea Actions Runner Test / test-job (push) Successful in 2s
CI / check (push) Failing after 21s
CI / tests-unit (push) Skipped
CI / tests-integration (push) Skipped
CI / tests-ui (push) Skipped
CI / preflight (push) Skipped
CI / deploy (push) Skipped
Gitea Actions Runner Test / test-job (push) Successful in 2s
CI / check (push) Failing after 21s
CI / tests-unit (push) Skipped
CI / tests-integration (push) Skipped
CI / tests-ui (push) Skipped
CI / preflight (push) Skipped
CI / deploy (push) Skipped
This commit is contained in:
1 parent
afc8909d3f
commit
a06db72c65
7 files changed
+185
-47
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { withAdmin } from "@/lib/api-handler";
|
||||
import { purgeEdgeCache } from "@/lib/edge-cache";
|
||||
import { PERMS } from "@/lib/permissions";
|
||||
import { repairMissingIcons } from "@/lib/services/repair-icons";
|
||||
|
||||
@@ -21,6 +22,18 @@ export const POST = withAdmin({ permission: PERMS.ASSETS_IMPORT }, async () => {
|
||||
|
||||
try {
|
||||
await repairMissingIcons(send);
|
||||
// After icon repair, purge the Cloudflare edge cache so updated
|
||||
// icons are immediately visible instead of waiting for the 1-year
|
||||
// s-maxage to expire.
|
||||
try {
|
||||
await purgeEdgeCache(["cms-furni-icons"], "repair-missing-icons");
|
||||
send({ type: "purge", tag: "cms-furni-icons" });
|
||||
} catch (purgeError) {
|
||||
send({
|
||||
type: "error",
|
||||
message: `repairMissingIcons completed but purge failed: ${(purgeError as Error).message}`,
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
send({
|
||||
type: "error",
|
||||
|
||||
Reference in new issue
Block a user