Skip to content

Commit

Permalink
chore: send referral id in the api (#467)
Browse files Browse the repository at this point in the history
## Why?

Clear and short explanation here.

## How?

- Done A (replace with a breakdown of the steps)
- Done B
- Done C

## Tickets?

- [Ticket 1](the-ticket-url-here)
- [Ticket 2](the-ticket-url-here)
- [Ticket 3](the-ticket-url-here)

## Contribution checklist?

- [ ] The commit messages are detailed
- [ ] The `build` command runs locally
- [ ] Assets or static content are linked and stored in the project
- [ ] Document filename is named after the slug
- [ ] You've reviewed spelling using a grammar checker
- [ ] For documentation, guides or references, you've tested the
commands and steps
- [ ] You've done enough research before writing

## Security checklist?

- [ ] Sensitive data has been identified and is being protected properly
- [ ] Injection has been prevented (parameterized queries, no eval or
system calls)
- [ ] The Components are escaping output (to prevent XSS)

## References?

Optionally, provide references such as links

## Preview?

Optionally, provide the preview url here
  • Loading branch information
Camila Sosa Morales authored Jan 24, 2025
1 parent f23eaaa commit 9d239f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/components/Eliza/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ export const createSubscription = async (
projectId?: string,
productId?: string,
token?: string,
referralId?: string,
): Promise<{
ok: boolean;
data?: {
Expand Down Expand Up @@ -269,6 +270,9 @@ export const createSubscription = async (
id: productId,
quantity: 1,
},
metadata: {
referralId,
},
}),
},
);
Expand Down
2 changes: 0 additions & 2 deletions src/components/Eliza/components/SubscriptionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ export const SubscriptionModal: React.FC<SubscriptionModalProps> = ({

setIsLoading(true);

// const referralId = window.promotekit_referral;

const subscriptionCreationResponse = await createSubscription(
activeProjectId,
productId,
Expand Down

0 comments on commit 9d239f7

Please sign in to comment.