feat(auth): wire verification code endpoints

This commit is contained in:
zetaloop
2026-02-28 15:39:48 +08:00
parent f085a49d87
commit cee3bd3719
2 changed files with 17 additions and 6 deletions
+7 -3
View File
@@ -1,4 +1,8 @@
export function sendForgotPasswordCode(email: string): never {
void email
throw new Error("Not implemented")
import { httpJson } from "./http"
export async function sendForgotPasswordCode(email: string): Promise<void> {
await httpJson<unknown>("/api/v1/auth/forgot-password/send", {
method: "POST",
json: { email },
})
}
+10 -3
View File
@@ -1,4 +1,11 @@
export function sendEmailVerificationCode(input: { email: string; scene: string }): never {
void input
throw new Error("Not implemented")
import { httpJson } from "./http"
export async function sendEmailVerificationCode(input: {
email: string
scene: string
}): Promise<void> {
await httpJson<unknown>("/api/v1/email/verification-code/send", {
method: "POST",
json: { email: input.email, scene: input.scene },
})
}