mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 15:07:32 +00:00
cleanup
This commit is contained in:
@@ -45,7 +45,6 @@ export default async function Page(props: { searchParams: Promise<any> }) {
|
||||
|
||||
if (invite === "true") {
|
||||
await sendInviteEmailCode({
|
||||
serviceUrl,
|
||||
userId,
|
||||
urlTemplate:
|
||||
`${host.includes("localhost") ? "http://" : "https://"}${host}${basePath}/verify?code={{.Code}}&userId={{.UserID}}&organization={{.OrgID}}&invite=true` +
|
||||
@@ -56,7 +55,6 @@ export default async function Page(props: { searchParams: Promise<any> }) {
|
||||
});
|
||||
} else {
|
||||
await sendEmailCode({
|
||||
serviceUrl,
|
||||
userId,
|
||||
urlTemplate:
|
||||
`${host.includes("localhost") ? "http://" : "https://"}${host}${basePath}/verify?code={{.Code}}&userId={{.UserID}}&organization={{.OrgID}}` +
|
||||
|
@@ -301,23 +301,28 @@ export async function resendVerification(command: resendVerifyEmailCommand) {
|
||||
});
|
||||
}
|
||||
|
||||
type sendEmailCommand = {
|
||||
serviceUrl: string;
|
||||
type SendEmailCommand = {
|
||||
userId: string;
|
||||
urlTemplate: string;
|
||||
};
|
||||
|
||||
export async function sendEmailCode(command: sendEmailCommand) {
|
||||
export async function sendEmailCode(command: SendEmailCommand) {
|
||||
const _headers = await headers();
|
||||
const { serviceUrl } = getServiceUrlFromHeaders(_headers);
|
||||
|
||||
return zitadelSendEmailCode({
|
||||
serviceUrl: command.serviceUrl,
|
||||
serviceUrl,
|
||||
userId: command.userId,
|
||||
urlTemplate: command.urlTemplate,
|
||||
});
|
||||
}
|
||||
|
||||
export async function sendInviteEmailCode(command: sendEmailCommand) {
|
||||
export async function sendInviteEmailCode(command: SendEmailCommand) {
|
||||
const _headers = await headers();
|
||||
const { serviceUrl } = getServiceUrlFromHeaders(_headers);
|
||||
|
||||
return createInviteCode({
|
||||
serviceUrl: command.serviceUrl,
|
||||
serviceUrl,
|
||||
userId: command.userId,
|
||||
urlTemplate: command.urlTemplate,
|
||||
});
|
||||
|
Reference in New Issue
Block a user