Skip to content

Commit

Permalink
verification added to aips
Browse files Browse the repository at this point in the history
  • Loading branch information
mariojere committed Jul 9, 2024
1 parent fa6cc4a commit b3d5e67
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/dapp/src/app/(auth)/auth-register/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ function Page() {
//console.log(`url ${url} `);

try {
console.log(url)
const response = await fetch(url, {
method: 'POST',
headers: {
Expand Down
5 changes: 4 additions & 1 deletion packages/dapp/src/app/api/v1/signup/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async function createSendTokens(user: users, email: string) {
// const host = req.headers.get('host');
const host = process.env.HOST;
//${host}api/v1/user/verification/verifyEmail?token=${token}
const verificationLink = `${host}/verifcation/email/${token}`;
const verificationLink = `${host}/verification/email/${token}`;

const mailOptions = {
from: emailServer,
Expand Down Expand Up @@ -169,6 +169,9 @@ async function createVisitor(

export async function POST(req: Request, res: NextResponse) {
try {
if (!req.body || Object.keys(req.body).length === 0) {
return NextResponse.json({ error: 'No data provided' }, { status: 400 });
}
const { email, password, username, type, wallet_address } =
await req.json();
// Check if user already exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async function createSendTokens(user_id: string, email: string) {
});

const host = process.env.HOST;
const verificationLink = `${host}/verifcation/email/${token}`;
const verificationLink = `${host}/verification/email/${token}`;

const mailOptions = {
from: emailServer,
Expand Down

0 comments on commit b3d5e67

Please sign in to comment.