Skip to content

Commit

Permalink
Revert change
Browse files Browse the repository at this point in the history
  • Loading branch information
Hacksore committed Aug 15, 2024
1 parent e8b2fee commit 1723614
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions apps/api/src/handlers/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
getLatestVersions,
getPlatformDownloads,
getStars,
isProd,
} from "../utils.js";
import { Bindings } from "../types.js";

Expand All @@ -23,7 +22,6 @@ app.get("/stars", async (c) => {
app.get("/latest/stable", async (c) => {
const response = await getPlatformDownloads({
authToken: c.env.GITHUB_TOKEN,
isProd: isProd(c.req.url),
});

if (!response) {
Expand Down
4 changes: 1 addition & 3 deletions apps/api/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,8 @@ export async function getStars({

export async function getPlatformDownloads({
authToken,
isProd,
}: {
authToken: string;
isProd: boolean;
}) {
// fetch all releases from github
try {
Expand All @@ -79,7 +77,7 @@ export async function getPlatformDownloads({
const versions = releases.assets
.map((asset) => ({
name: asset.name,
url: `${getApiUrl(isProd)}/download/${filenameToPlatform(asset.name)}`,
url: asset.browser_download_url,
platform: filenameToPlatform(asset.name),
}))
.filter((asset) => asset.name.match(/\.(dmg|msi|AppImage)$/));
Expand Down

0 comments on commit 1723614

Please sign in to comment.