mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-01 16:45:40 +02:00
added signup and verify email forms
This commit is contained in:
parent
41cbde1474
commit
f3eb76fd5e
14 changed files with 882 additions and 11 deletions
|
@ -59,12 +59,19 @@ export async function verifyEmail(
|
|||
emailVerified: true,
|
||||
})
|
||||
.where(eq(users.id, user.id));
|
||||
} else {
|
||||
return next(
|
||||
createHttpError(
|
||||
HttpCode.BAD_REQUEST,
|
||||
"Invalid verification code",
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return response<VerifyEmailResponse>(res, {
|
||||
success: true,
|
||||
error: false,
|
||||
message: valid ? "Code is valid" : "Code is invalid",
|
||||
message: "Email verified",
|
||||
status: HttpCode.OK,
|
||||
data: {
|
||||
valid,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue