feat(staging): switch to local postgres

This commit is contained in:
Jesse_Chen
2026-07-22 11:04:36 +08:00
parent f5c57efeba
commit a1b8eaec36
30 changed files with 1011 additions and 141 deletions
+7
View File
@@ -19,11 +19,13 @@ export interface SelfHostedOtpClient {
otp: string;
}): Promise<OtpClientResult>;
};
signOut?(): Promise<OtpClientResult>;
}
export interface SelfHostedOtpActions {
send(email: string): Promise<void>;
verify(email: string, otp: string): Promise<void>;
signOut(): Promise<void>;
}
export function createSelfHostedOtpActions(
@@ -48,6 +50,11 @@ export function createSelfHostedOtpActions(
throw new Error("验证码错误或已过期,请重新获取");
}
},
async signOut() {
if (!client.signOut) throw new Error("退出失败,请稍后再试");
const result = await client.signOut();
if (result.error) throw new Error("退出失败,请稍后再试");
},
};
}