chore: format code

This commit is contained in:
GitHub Action 2025-12-17 16:59:57 +00:00
parent be1a3536ae
commit 6e85a07977

View file

@ -1,20 +1,20 @@
import { APIEvent } from "@solidjs/start";
import { APIEvent } from "@solidjs/start"
const assetNames: Record<string, string> = {
"darwin-aarch64-dmg": "opencode-desktop-darwin-aarch64.dmg",
"windows-x64-nsis": "opencode-desktop-windows-x64.exe",
"linux-x64-deb": "opencode-desktop-linux-amd64.deb",
"linux-x64-rpm": "opencode-desktop-linux-x86_64.rpm"
"linux-x64-rpm": "opencode-desktop-linux-x86_64.rpm",
}
export async function GET({ params: { platform } }: APIEvent) {
const assetName = assetNames[platform];
if(!assetName) return new Response("Not Found", { status: 404 });
const assetName = assetNames[platform]
if (!assetName) return new Response("Not Found", { status: 404 })
return await fetch(`https://github.com/sst/opencode/releases/latest/download/${assetName}`, {
cf: {
cacheTtl: 60 * 60 * 24,
cacheEverything: true,
}
},
} as any)
}