Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PUBLIC_FIREBASE_API_KEY=
PUBLIC_FIREBASE_AUTH_DOMAIN=gdg-platform-cochabamba.firebaseapp.com
PUBLIC_FIREBASE_PROJECT_ID=gdg-platform-cochabamba
PUBLIC_FIREBASE_STORAGE_BUCKET=gdg-platform-cochabamba.firebasestorage.app
PUBLIC_FIREBASE_MESSAGING_SENDER_ID=
PUBLIC_FIREBASE_APP_ID=
PUBLIC_FIREBASE_API_KEY=AIzaSyCFWM4dS64m-MJOLVTemsHcpT8HDbVATMo
PUBLIC_FIREBASE_AUTH_DOMAIN=gdg-cbba-bo.firebaseapp.com
PUBLIC_FIREBASE_PROJECT_ID=gdg-cbba-bo
PUBLIC_FIREBASE_STORAGE_BUCKET=gdg-cbba-bo.appspot.com
PUBLIC_FIREBASE_MESSAGING_SENDER_ID=37363473996
PUBLIC_FIREBASE_APP_ID=1:37363473996:web:27fb07d725c3486073dee9
PUBLIC_EVENT_SLUG=devfest-2025
4 changes: 3 additions & 1 deletion src/lib/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export function getDb(): Firestore {
messagingSenderId: import.meta.env.PUBLIC_FIREBASE_MESSAGING_SENDER_ID,
appId: import.meta.env.PUBLIC_FIREBASE_APP_ID,
});
db = getFirestore(app);
// DevFest 2025 is a past event: its data is frozen in the read-only "legacy"
// database of gdg-cbba-bo. New events live in the (default) database.
db = getFirestore(app, "legacy");
}
return db;
}
2 changes: 2 additions & 0 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import {

const slug = import.meta.env.PUBLIC_EVENT_SLUG ?? "devfest-2025";
const event = await getEventBySlug(slug);
// Never publish an empty landing: fail the build if the event isn't in the database.
if (!event) throw new Error(`Event "${slug}" not found in Firestore`);

let speakers: Awaited<ReturnType<typeof getEventSpeakers>> = [];
let team: Awaited<ReturnType<typeof getEventTeam>> = [];
Expand Down
Loading