Skip to content

Commit

Permalink
Merge pull request #1536 from ItzNotABug/use-env-var-for-growth
Browse files Browse the repository at this point in the history
Use `.env` var
  • Loading branch information
ernstmul authored Nov 26, 2024
2 parents 321f82a + aab0d95 commit c7560e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { redirect } from '@sveltejs/kit';
import { base } from '$app/paths';
import type { PageLoad } from './$types';
import { sdk } from '$lib/stores/sdk';
import { VARS } from '$lib/system';

const handleGithubEducationMembership = async (name: string, email: string) => {
const result = await sdk.forConsole.billing.setMembership('github-student-developer');
Expand Down Expand Up @@ -46,9 +47,8 @@ export const load: PageLoad = async ({ parent, url }) => {
};

const setToGhStudentMailingList = async (name: string, email: string) => {
const path = `/mailinglists/gh-student`;
const body = name !== '' ? { name, email } : { email };
return fetch('https://growth.appwrite.io/v1' + path, {
return fetch(`${VARS.GROWTH_ENDPOINT}/mailinglists/gh-student`, {
method: 'POST',
body: JSON.stringify(body),
headers: {
Expand Down

0 comments on commit c7560e3

Please sign in to comment.