Skip to content
Open
Changes from 1 commit
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
5 changes: 4 additions & 1 deletion src/lib/stores/feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { get, writable } from 'svelte/store';
import { Submit, trackEvent } from '$lib/actions/analytics';
import FeedbackNps from '$lib/components/feedback/feedbackNPS.svelte';
import FeedbackGeneral from '$lib/components/feedback/feedbackGeneral.svelte';
import { resolvedProfile, type Profile } from '$lib/profiles/index.svelte';
import { resolvedProfile, ProfileMode, type Profile } from '$lib/profiles/index.svelte';

export type Feedback = {
elapsed: number;
Expand Down Expand Up @@ -135,6 +135,8 @@ function createFeedbackStore() {
customFields.push({ id: '56109', value: billingPlan });
}

const platform = resolvedProfile.id === ProfileMode.STUDIO ? 'imagine' : 'appwrite';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can use resolvedProfile.organizationPlatform.


const response = await fetch(`${VARS.GROWTH_ENDPOINT}/feedback`, {
method: 'POST',
headers: {
Expand All @@ -144,6 +146,7 @@ function createFeedbackStore() {
subject,
message,
email,
platform,
customFields,
firstname: (name || 'Unknown').slice(0, 40),
metaFields: {
Expand Down
Loading