mirror of
https://github.com/formbricks/formbricks.git
synced 2026-03-14 11:10:45 -05:00
* added intro and surveySelect page * added home page and wrapper component * added spreadsheet select * added data write functionality and added integration schema model * improved UX * reworked UI * added google sheet integration * removed some unused code * added user email * UI tweaks * fixed build issues and made added question to top of spreadsheets * adds refreshSheets and added empty survey/spreadsheets text * restored pnpm-lock * added duplicate sheet warning * move process.env to t3env * move migration * update docs link, add note to show that sheets integration is not configured * Add simple docs page for google-sheets * added session check * restored pnpm-lock * Merge branch 'main' of github.com:formbricks/formbricks into Integration/Google-sheet * added google sheet env variables to runtimeEnv --------- Co-authored-by: Johannes <johannes@formbricks.com> Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
15 lines
418 B
TypeScript
15 lines
418 B
TypeScript
export const authorize = async (environmentId: string, apiHost: string): Promise<string> => {
|
|
const res = await fetch(`${apiHost}/api/google-sheet`, {
|
|
method: "GET",
|
|
headers: { environmentId: environmentId },
|
|
});
|
|
|
|
if (!res.ok) {
|
|
console.error(res.text);
|
|
throw new Error("Could not create response");
|
|
}
|
|
const resJSON = await res.json();
|
|
const authUrl = resJSON.authUrl;
|
|
return authUrl;
|
|
};
|