mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-25 10:20:03 -06:00
fix: adds default weekly summary notification value in signin (#2993)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import CredentialsProvider from "next-auth/providers/credentials";
|
||||
import GitHubProvider from "next-auth/providers/github";
|
||||
import GoogleProvider from "next-auth/providers/google";
|
||||
import { prisma } from "@formbricks/database";
|
||||
import { TUserNotificationSettings } from "@formbricks/types/user";
|
||||
import { createAccount } from "./account/service";
|
||||
import { verifyPassword } from "./auth/utils";
|
||||
import {
|
||||
@@ -275,7 +276,7 @@ export const authOptions: NextAuthOptions = {
|
||||
userId: userProfile.id,
|
||||
});
|
||||
|
||||
const updatedNotificationSettings = {
|
||||
const updatedNotificationSettings: TUserNotificationSettings = {
|
||||
...userProfile.notificationSettings,
|
||||
alert: {
|
||||
...userProfile.notificationSettings?.alert,
|
||||
@@ -286,6 +287,9 @@ export const authOptions: NextAuthOptions = {
|
||||
organization.id,
|
||||
])
|
||||
),
|
||||
weeklySummary: {
|
||||
...userProfile.notificationSettings?.weeklySummary,
|
||||
},
|
||||
};
|
||||
|
||||
await updateUser(userProfile.id, {
|
||||
|
||||
Reference in New Issue
Block a user