summaryrefslogtreecommitdiff
path: root/lib/tech-vendor-invitation-token.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tech-vendor-invitation-token.ts')
-rw-r--r--lib/tech-vendor-invitation-token.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/tech-vendor-invitation-token.ts b/lib/tech-vendor-invitation-token.ts
index 83c82448..04a31bcc 100644
--- a/lib/tech-vendor-invitation-token.ts
+++ b/lib/tech-vendor-invitation-token.ts
@@ -15,6 +15,7 @@ export interface TechVendorInvitationPayload {
vendorId: number;
vendorName: string;
email: string;
+ vendorType: "조선" | "해양TOP" | "해양HULL" | ("조선" | "해양TOP" | "해양HULL")[];
type: "tech-vendor-invitation";
expiresAt: number;
}
@@ -26,6 +27,7 @@ export async function createTechVendorInvitationToken(payload: {
vendorId: number;
vendorName: string;
email: string;
+ vendorType: "조선" | "해양TOP" | "해양HULL" | ("조선" | "해양TOP" | "해양HULL")[];
}): Promise<string> {
const expiresAt = Date.now() + 7 * 24 * 60 * 60 * 1000; // 7일
@@ -34,6 +36,7 @@ export async function createTechVendorInvitationToken(payload: {
vendorName: payload.vendorName,
email: payload.email,
type: "tech-vendor-invitation",
+ vendorType: payload.vendorType,
expiresAt,
})
.setProtectedHeader({ alg: "HS256" })
@@ -78,6 +81,6 @@ export async function verifyTechVendorInvitationToken(
* 초대 토큰을 포함한 가입 URL 생성
*/
export async function createTechVendorSignupUrl(token: string): Promise<string> {
- const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000";
- return `${baseUrl}/ko/auth/tech-signup?token=${token}`;
+ const baseUrl = process.env.NEXT_PUBLIC_URL || "http://localhost:3000";
+ return `${baseUrl}/partners/tech-signup?token=${token}`;
} \ No newline at end of file