fix: platform library export-verifyEmailCodeUnAuthenticated (#23814)

* fix apiv2

* fix import
This commit is contained in:
Benny Joo authored and GitHub committed 2025-09-13 08:16:04 -03:00
1 parent 639940d1bf
commit a7fecaf578
6 files changed
+10 -11

No files matched your search

+1 -1
View File
@@ -38,7 +38,7 @@
"@axiomhq/winston": "^1.2.0",
"@calcom/platform-constants": "*",
"@calcom/platform-enums": "*",
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.356",
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.358",
"@calcom/platform-types": "*",
"@calcom/platform-utils": "*",
"@calcom/prisma": "*",
@@ -27,7 +27,7 @@ export class VerificationAtomsService {
async verifyEmailCodeUnAuthenticated(input: VerifyEmailCodeInput) {
try {
return await verifyCodeUnAuthenticated(input);
return await verifyCodeUnAuthenticated(input.email, input.code);
} catch (error) {
if (error instanceof Error) {
if (error.message === "invalid_code") {
+1 -1
View File
@@ -128,7 +128,7 @@ export { checkAdminOrOwner } from "@calcom/features/auth/lib/checkAdminOrOwner";
export { verifyPhoneNumber, sendVerificationCode };
export { verifyCodeUnAuthenticated } from "@calcom/trpc/server/routers/viewer/auth/verifyCodeUnAuthenticated.handler";
export { verifyCodeUnAuthenticated } from "@calcom/trpc/server/routers/viewer/auth/util";
export { verifyCode as verifyCodeAuthenticated } from "@calcom/trpc/server/routers/viewer/organizations/verifyCode.handler";
@@ -24,5 +24,5 @@ export const verifyCodeUnAuthenticated = async (email: string, code: string) =>
throw new Error("Invalid verification code");
}
return;
return true;
};
@@ -11,8 +11,7 @@ type VerifyTokenOptions = {
export const verifyCodeUnAuthenticatedHandler = async ({ input }: VerifyTokenOptions) => {
const { email, code } = input;
try {
await verifyCodeUnAuthenticated(email, code);
return true;
return await verifyCodeUnAuthenticated(email, code);
} catch (error) {
throw new TRPCError({ code: "BAD_REQUEST", message: "invalid_code" });
}
+5 -5
View File
@@ -2715,7 +2715,7 @@ __metadata:
"@axiomhq/winston": ^1.2.0
"@calcom/platform-constants": "*"
"@calcom/platform-enums": "*"
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.356"
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.358"
"@calcom/platform-types": "*"
"@calcom/platform-utils": "*"
"@calcom/prisma": "*"
@@ -3775,13 +3775,13 @@ __metadata:
languageName: unknown
linkType: soft
"@calcom/platform-libraries@npm:@calcom/platform-libraries@0.0.356":
version: 0.0.356
resolution: "@calcom/platform-libraries@npm:0.0.356"
"@calcom/platform-libraries@npm:@calcom/platform-libraries@0.0.358":
version: 0.0.358
resolution: "@calcom/platform-libraries@npm:0.0.358"
dependencies:
"@calcom/features": "*"
"@calcom/lib": "*"
checksum: dabce8a4add6c8082f06168ce9fbfef9be258f8ac3c60cb81e1985b4b49e2503f0f539dda9faf371bd1c79133419aed36d0ff849b6a2ecca77e7854752d8c97d
checksum: 2a3436a24c62c38aa1299237cc2c650826a3cfc9cbffa5cc2f37244abed13dc0f55dbd314037e16af3168b9e7bfa4b62abf20aee00654e8aa24ab4bc7e76c642
languageName: node
linkType: hard