mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-05 16:19:55 -06:00
fix: invite functionality for providers (#2852)
This commit is contained in:
committed by
GitHub
parent
a00c696c1a
commit
6a0cabf249
@@ -88,6 +88,8 @@ const Page = async ({ searchParams }) => {
|
||||
await updateUser(session.user.id, {
|
||||
notificationSettings: {
|
||||
...session.user.notificationSettings,
|
||||
alert: session.user.notificationSettings.alert ?? {},
|
||||
weeklySummary: session.user.notificationSettings.weeklySummary ?? {},
|
||||
unsubscribedOrganizationIds: Array.from(
|
||||
new Set([
|
||||
...(session.user.notificationSettings?.unsubscribedOrganizationIds || []),
|
||||
|
||||
@@ -27,9 +27,6 @@ const Page = async () => {
|
||||
let environment: TEnvironment | null = null;
|
||||
try {
|
||||
environment = await getFirstEnvironmentByUserId(session?.user.id);
|
||||
if (!environment) {
|
||||
throw new Error("No environment found");
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`error getting environment: ${error}`);
|
||||
}
|
||||
@@ -41,7 +38,7 @@ const Page = async () => {
|
||||
}
|
||||
|
||||
if (!environment) {
|
||||
console.error("Failed to get first environment of user; signing out");
|
||||
console.error("Failed to get first environment of user");
|
||||
return redirect(`/organizations/${userOrganizations[0].id}/products/new/channel`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user