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") {
|
if (invite === "true") {
|
||||||
await sendInviteEmailCode({
|
await sendInviteEmailCode({
|
||||||
serviceUrl,
|
|
||||||
userId,
|
userId,
|
||||||
urlTemplate:
|
urlTemplate:
|
||||||
`${host.includes("localhost") ? "http://" : "https://"}${host}${basePath}/verify?code={{.Code}}&userId={{.UserID}}&organization={{.OrgID}}&invite=true` +
|
`${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 {
|
} else {
|
||||||
await sendEmailCode({
|
await sendEmailCode({
|
||||||
serviceUrl,
|
|
||||||
userId,
|
userId,
|
||||||
urlTemplate:
|
urlTemplate:
|
||||||
`${host.includes("localhost") ? "http://" : "https://"}${host}${basePath}/verify?code={{.Code}}&userId={{.UserID}}&organization={{.OrgID}}` +
|
`${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 = {
|
type SendEmailCommand = {
|
||||||
serviceUrl: string;
|
|
||||||
userId: string;
|
userId: string;
|
||||||
urlTemplate: 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({
|
return zitadelSendEmailCode({
|
||||||
serviceUrl: command.serviceUrl,
|
serviceUrl,
|
||||||
userId: command.userId,
|
userId: command.userId,
|
||||||
urlTemplate: command.urlTemplate,
|
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({
|
return createInviteCode({
|
||||||
serviceUrl: command.serviceUrl,
|
serviceUrl,
|
||||||
userId: command.userId,
|
userId: command.userId,
|
||||||
urlTemplate: command.urlTemplate,
|
urlTemplate: command.urlTemplate,
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user