This commit is contained in:
peintnermax
2024-10-17 17:27:21 +02:00
parent 08a7cca625
commit d1ed95d33b

View File

@@ -30,7 +30,7 @@ import { PasswordComplexitySettingsSchema } from "@zitadel/proto/zitadel/setting
import type { RedirectURLsJson } from "@zitadel/proto/zitadel/user/v2/idp_pb"; import type { RedirectURLsJson } from "@zitadel/proto/zitadel/user/v2/idp_pb";
import { import {
NotificationType, NotificationType,
SendPasswordResetLink, SendPasswordResetLinkSchema,
} from "@zitadel/proto/zitadel/user/v2/password_pb"; } from "@zitadel/proto/zitadel/user/v2/password_pb";
import { import {
SearchQuery, SearchQuery,
@@ -496,9 +496,9 @@ export function createUser(
* @returns the newly set email * @returns the newly set email
*/ */
export async function passwordReset(userId: string, host: string | null) { export async function passwordReset(userId: string, host: string | null) {
let medium: Partial<SendPasswordResetLink> = { let medium = create(SendPasswordResetLinkSchema, {
notificationType: NotificationType.Email, notificationType: NotificationType.Email,
}; });
if (host) { if (host) {
medium = { medium = {