Skip to content

Commit

Permalink
Fix canary download urls
Browse files Browse the repository at this point in the history
  • Loading branch information
Hacksore committed Aug 15, 2024
1 parent 278c32d commit d89779c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions apps/api/src/handlers/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,12 @@ app.get("/latest/stable", async (c) => {
);
});

// TODO: support local loading of canary artifacts somehow?
app.get("/latest/canary", async (c) => {
const files = await c.env.BUCKET.list({
prefix: "canary/",
});

const prod = isProd(c.req.url);

// fetch the latest version form the bucket
const latestFile = await c.env.BUCKET.get("canary/latest.json");
const latest = (await latestFile?.json()) as {
Expand All @@ -66,7 +65,7 @@ app.get("/latest/canary", async (c) => {
const platform = file.key.split("/")[1].split("-")[2];
return {
name: file.key,
url: `${getApiUrl(prod)}/download/${platform}`,
url: `https://artifacts.overlayed.dev/${file.key}`,
platform,
};
})
Expand Down

0 comments on commit d89779c

Please sign in to comment.