Skip to content

Commit 403860e

Browse files
committed
Route download url correctly for freebuff
1 parent feede25 commit 403860e

File tree

1 file changed

+4
-1
lines changed
  • web/src/app/api/releases/download/[version]/[filename]

1 file changed

+4
-1
lines changed

web/src/app/api/releases/download/[version]/[filename]/route.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ export async function GET(
1717
return NextResponse.json({ error: 'Missing parameters' }, { status: 400 })
1818
}
1919

20+
// Freebuff releases use a "freebuff-v" tag prefix to avoid colliding with codebuff releases
21+
const tagPrefix = filename.startsWith('freebuff-') ? 'freebuff-v' : 'v'
22+
2023
// Current download location - can be changed in the future without affecting old clients
21-
const downloadUrl = `https://github.com/CodebuffAI/codebuff-community/releases/download/v${version}/${filename}`
24+
const downloadUrl = `https://github.com/CodebuffAI/codebuff-community/releases/download/${tagPrefix}${version}/${filename}`
2225

2326
return NextResponse.redirect(downloadUrl, 302)
2427
}

0 commit comments

Comments
 (0)