Use correct redeem flow

This commit is contained in:
Maximilian Harz 2025-06-26 00:05:21 +02:00
parent c0f4715bc8
commit 7388a02afd
3 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
VITE_OPEN_COLLECTIVE_API_KEY=your_key
VITE_API_URL=https://api.utopia-lab.org
VITE_VALIDATE_INVITE_FLOW_ID=01d61db0-25aa-4bfa-bc24-c6a8f208a455
VITE_REDEEM_INVITE_FLOW_ID=todo
VITE_REDEEM_INVITE_FLOW_ID=cc80ec73-ecf5-4789-bee5-1127fb1a6ed4

View File

@ -39,8 +39,7 @@ export class InviteApi {
async redeemInvite(inviteId: string): Promise<string | null> {
try {
const response = await fetch(
// `${config.apiUrl}/flows/trigger/${config.redeemInviteFlowId}?secret=${inviteId}`,
`${config.apiUrl}/flows/trigger/${config.validateInviteFlowId}?secret=${inviteId}`,
`${config.apiUrl}/flows/trigger/${config.redeemInviteFlowId}?secret=${inviteId}`,
{
method: 'GET',
mode: 'cors',

View File

@ -3,6 +3,8 @@ export const config = {
validateInviteFlowId: String(
import.meta.env.VITE_VALIDATE_INVITE_FLOW_ID ?? '01d61db0-25aa-4bfa-bc24-c6a8f208a455',
),
redeemInviteFlowId: String(import.meta.env.VITE_REDEEM_INVITE_FLOW_ID ?? 'todo'),
redeemInviteFlowId: String(
import.meta.env.VITE_REDEEM_INVITE_FLOW_ID ?? 'cc80ec73-ecf5-4789-bee5-1127fb1a6ed4',
),
openCollectiveApiKey: String(import.meta.env.VITE_OPEN_COLLECTIVE_API_KEY ?? ''),
}