Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Tech Partner API to new one #1510

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
16 changes: 10 additions & 6 deletions src/routes/integrations/technology-partner/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
//import BlobPink from "$routes/startups/(assets)/blob-pink.svg";
// import BlobPinkMobile from "$routes/startups/(assets)/blob-pink-mobile.svg";
import Pink from './bg.png';
import { PUBLIC_GROWTH_ENDPOINT } from '$env/static/public';

let email = '';
let name = '';
Expand All @@ -27,19 +28,22 @@

async function handleSubmit() {
error = undefined;
message = `Name of representative: ${name}\n\nWork Email: ${email}\n\nCompany Name: ${companyName}\n\nCompany Size: ${companySize}\n\nCompany Website: ${companyWebsite}\n\nIntegration status: ${integrationStatus}\n\nLink to Documentation: ${linkToDocumentation}\n\nLink to product/company assets: ${productUrl}\n\nDetails: ${extraDetails}`;
subject = `Technology Partner Application: ${companyName}`;

const response = await fetch('https://growth.appwrite.io/v1/feedback', {
const response = await fetch(`${PUBLIC_GROWTH_ENDPOINT}/conversations/technology-partner`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: name,
email,
firstName: name,
subject,
message
companyName,
companySize,
companyWebsite,
integrationStatus,
integrationDocs: linkToDocumentation,
brandAssets: productUrl,
extraDetails
})
});
if (response.status >= 400) {
Expand Down
Loading