Skip to content

Commit

Permalink
chore: auth - vercel -> gcp
Browse files Browse the repository at this point in the history
  • Loading branch information
louis030195 committed Feb 14, 2023
1 parent 6de3a3c commit 3a9e577
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,23 +348,15 @@ export const openApp = async (vaultId: string) => {
};

export async function getLinkData(vaultId: string) {
// TODO: ship for everyone in next release
const response = posthog.isFeatureEnabled('new-auth')
? await fetch(
`https://auth-c6txy76x2q-uc.a.run.app?token=${vaultId}&service=obsidian`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
}
)
: await fetch(`${baseURL}/api/auth?token=${vaultId}&service=obsidian`, {
const response = await fetch(
`https://auth-c6txy76x2q-uc.a.run.app?token=${vaultId}&service=obsidian`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
mode: 'cors',
},
});
}
);
const data: LinkData = await response.json();
return data;
}
Expand Down

0 comments on commit 3a9e577

Please sign in to comment.