Skip to content

Commit

Permalink
Merge branch 'main' into dsp/close-registration
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsp45 committed Apr 4, 2024
2 parents 360e7bd + 650bb66 commit 8ad241e
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 29 deletions.
16 changes: 8 additions & 8 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
PUBLIC_SUPABASE_URL=<SUPABASE URL>
PUBLIC_SUPABASE_ANON_KEY=<SUPERBASE ANON KEY>
PUBLIC_SENDER_EMAIL=<EMAIL USED FOR AUTOMATIC EMAILS>
PUBLIC_DISCORD_INVITE=<DISCORD SERVER INVITE LINK>
PUBLIC_SES_REGION=<REGION OF YOU SES CONFIG>
PUBLIC_SMTP_USER=<YOUR SMTP USER>
PUBLIC_SMTP_PASS=<YOUR SMTP PASSWORD>
PUBLIC_SMTP_HOST=<YOUR SMTP HOST>
SUPABASE_URL=<SUPABASE URL>
SUPABASE_ANON_KEY=<SUPERBASE ANON KEY>
SENDER_EMAIL=<EMAIL USED FOR AUTOMATIC EMAILS>
DISCORD_INVITE=<DISCORD SERVER INVITE LINK>
SES_REGION=<REGION OF YOU SES CONFIG>
SMTP_USER=<YOUR SMTP USER>
SMTP_PASS=<YOUR SMTP PASSWORD>
SMTP_HOST=<YOUR SMTP HOST>
PUBLIC_BLOCKED_URLS=<BLOCKED URL's SEPARATED BY COMMAS>
PUBLIC_HOST_URL=<YOUR HOST URL>
Binary file added public/docs/survival-guide.pdf
Binary file not shown.
1 change: 1 addition & 0 deletions src/components/header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const { sticky } = Astro.props;
const navItems: Array<NavItem> = [
{ title: "Regulation", url: "/docs/regulation.pdf" },
{ title: "Survival Guide", url: "/docs/survival-guide.pdf" },
{ title: "FAQs", url: "/faqs" },
{ title: "Previous edition", url: "https://2023.bugsbyte.org/" },
{ title: "Team formation", url: "/teams" },
Expand Down
4 changes: 2 additions & 2 deletions src/lib/supabase.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createClient } from "@supabase/supabase-js";

export const supabase = createClient(
import.meta.env.PUBLIC_SUPABASE_URL as string,
import.meta.env.PUBLIC_SUPABASE_ANON_KEY as string,
import.meta.env.SUPABASE_URL as string,
import.meta.env.SUPABASE_ANON_KEY as string,
);
14 changes: 7 additions & 7 deletions src/pages/api/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ import { SMTPClient } from "emailjs";
export const prerender = false;

const supabase = createClient(
import.meta.env.PUBLIC_SUPABASE_URL,
import.meta.env.PUBLIC_SUPABASE_ANON_KEY,
import.meta.env.SUPABASE_URL,
import.meta.env.SUPABASE_ANON_KEY,
);
const senderEmail = import.meta.env.PUBLIC_SENDER_EMAIL;
const discordInvite = import.meta.env.PUBLIC_DISCORD_INVITE;
const senderEmail = import.meta.env.SENDER_EMAIL;
const discordInvite = import.meta.env.DISCORD_INVITE;

const client = new SMTPClient({
user: import.meta.env.PUBLIC_SMTP_USER,
password: import.meta.env.PUBLIC_SMTP_PASS,
host: import.meta.env.PUBLIC_SMTP_HOST,
user: import.meta.env.SMTP_USER,
password: import.meta.env.SMTP_PASS,
host: import.meta.env.SMTP_HOST,
ssl: true,
});

Expand Down
12 changes: 6 additions & 6 deletions src/pages/api/teams/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ import { SMTPClient } from "emailjs";

export const prerender = false;

const senderEmail = import.meta.env.PUBLIC_SENDER_EMAIL;
const senderEmail = import.meta.env.SENDER_EMAIL;
const client = new SMTPClient({
user: import.meta.env.PUBLIC_SMTP_USER,
password: import.meta.env.PUBLIC_SMTP_PASS,
host: import.meta.env.PUBLIC_SMTP_HOST,
user: import.meta.env.SMTP_USER,
password: import.meta.env.SMTP_PASS,
host: import.meta.env.SMTP_HOST,
ssl: true,
});

const supabase = createClient(
import.meta.env.PUBLIC_SUPABASE_URL,
import.meta.env.PUBLIC_SUPABASE_ANON_KEY,
import.meta.env.SUPABASE_URL,
import.meta.env.SUPABASE_ANON_KEY,
);

const { randomUUID } = new ShortUniqueId({ length: 6 });
Expand Down
12 changes: 6 additions & 6 deletions src/pages/api/teams/join.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import { SMTPClient } from "emailjs";
export const prerender = false;

const supabase = createClient(
import.meta.env.PUBLIC_SUPABASE_URL,
import.meta.env.PUBLIC_SUPABASE_ANON_KEY,
import.meta.env.SUPABASE_URL,
import.meta.env.SUPABASE_ANON_KEY,
);

const senderEmail = import.meta.env.PUBLIC_SENDER_EMAIL;
const senderEmail = import.meta.env.SENDER_EMAIL;
const client = new SMTPClient({
user: import.meta.env.PUBLIC_SMTP_USER,
password: import.meta.env.PUBLIC_SMTP_PASS,
host: import.meta.env.PUBLIC_SMTP_HOST,
user: import.meta.env.SMTP_USER,
password: import.meta.env.SMTP_PASS,
host: import.meta.env.SMTP_HOST,
ssl: true,
});

Expand Down

0 comments on commit 8ad241e

Please sign in to comment.