Skip to content

Commit 9182508

Browse files
committed
Fix R2 url
1 parent 7347114 commit 9182508

2 files changed

Lines changed: 2 additions & 38 deletions

File tree

apps/api/src/index.ts

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -124,44 +124,6 @@ app.get(
124124
}),
125125
);
126126

127-
app.get(
128-
"/static/versions",
129-
asyncHandler(async (_req, res) => {
130-
const airportsVersion = await rdsGetSingle("static_airports:version");
131-
const firsVersion = await rdsGetSingle("static_firs:version");
132-
const traconsVersion = await rdsGetSingle("static_tracons:version");
133-
const airlinesVersion = await rdsGetSingle("static_airlines:version");
134-
135-
res.json({
136-
airportsVersion,
137-
firsVersion,
138-
traconsVersion,
139-
airlinesVersion,
140-
});
141-
}),
142-
);
143-
144-
app.get(
145-
"/static/:type",
146-
asyncHandler(async (req, res) => {
147-
const type = validateString(req.params.type, "Type", 1, 20);
148-
const allowedTypes = ["airports", "tracons", "firs", "airlines"];
149-
150-
if (!allowedTypes.includes(type)) {
151-
res.status(400).json({ error: "Invalid static data type" });
152-
return;
153-
}
154-
155-
const data = await rdsGetSingle(`static_${type}:all`);
156-
if (!data) {
157-
res.status(404).json({ error: "Static data not found" });
158-
return;
159-
}
160-
161-
res.json(data);
162-
}),
163-
);
164-
165127
app.get(
166128
"/data/init",
167129
asyncHandler(async (_req, res) => {

apps/web/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ COPY --from=prepare /app/out/full/ .
2020

2121
ARG NEXT_PUBLIC_API_URL
2222
ARG NEXT_PUBLIC_WEBSOCKET_URL
23+
ARG NEXT_PUBLIC_R2_BUCKET_URL
2324
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
2425
ENV NEXT_PUBLIC_WEBSOCKET_URL=$NEXT_PUBLIC_WEBSOCKET_URL
26+
ENV NEXT_PUBLIC_R2_BUCKET_URL=$NEXT_PUBLIC_R2_BUCKET_URL
2527

2628
RUN npm run build
2729

0 commit comments

Comments
 (0)