Resolve rejected Apple:
Add:
public/aset/logo/hiconnect.png
src/app/(support)/
src/app/api/helper/
Fix:
- bun.lock
- package.json
- src/app/api/auth/login/route.ts
- src/app/api/auth/resend/route.ts
- src/middleware.tsx
### No issue
This commit is contained in:
@@ -29,11 +29,11 @@ export async function POST(req: Request) {
|
||||
{ status: 400 }
|
||||
);
|
||||
|
||||
const msg = `HIPMI - Kode ini bersifat RAHASIA dan JANGAN DI BAGIKAN KEPADA SIAPAPUN, termasuk anggota ataupun pengurus HIPMI lainnya.\n\n>> Kode OTP anda: ${codeOtp}.`;
|
||||
const encodedMsg = encodeURIComponent(msg);
|
||||
const msg = `HIPMI%20-%20Kode%20ini%20bersifat%20RAHASIA%20dan%20JANGAN%20DI%20BAGIKAN%20KEPADA%20SIAPAPUN%2C%20termasuk%20anggota%20ataupun%20pengurus%20HIPMI%20lainnya.%5Cn%5Cn%3E%3E%20Kode%20OTP%20anda%3A%20${codeOtp}.`;
|
||||
// const encodedMsg = encodeURIComponent(msg);
|
||||
|
||||
const res = await fetch(
|
||||
`https://wa.wibudev.com/code?nom=${nomor}&text=${encodedMsg}`,
|
||||
`https://wa.wibudev.com/code?nom=${nomor}&text=${msg}`,
|
||||
{ cache: "no-cache" }
|
||||
);
|
||||
|
||||
|
||||
@@ -16,11 +16,10 @@ export async function POST(req: Request) {
|
||||
const body = await req.json();
|
||||
const { nomor } = body;
|
||||
|
||||
const msg = `HIPMI - Kode ini bersifat RAHASIA dan JANGAN DI BAGIKAN KEPADA SIAPAPUN, termasuk anggota ataupun pengurus HIPMI lainnya.\n\n>> Kode OTP anda: ${codeOtp}.`;
|
||||
const encodedMsg = encodeURIComponent(msg);
|
||||
const msg = `HIPMI%20-%20Kode%20ini%20bersifat%20RAHASIA%20dan%20JANGAN%20DI%20BAGIKAN%20KEPADA%20SIAPAPUN%2C%20termasuk%20anggota%20ataupun%20pengurus%20HIPMI%20lainnya.%5Cn%5Cn%3E%3E%20Kode%20OTP%20anda%3A%20${codeOtp}.`;
|
||||
|
||||
const res = await fetch(
|
||||
`https://wa.wibudev.com/code?nom=${nomor}&text=${encodedMsg}`,
|
||||
`https://wa.wibudev.com/code?nom=${nomor}&text=${msg}`,
|
||||
{ cache: "no-cache" }
|
||||
);
|
||||
|
||||
|
||||
41
src/app/api/helper/delete-account/route.ts
Normal file
41
src/app/api/helper/delete-account/route.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { Resend } from "resend";
|
||||
|
||||
const resend = new Resend(process.env.RESEND_APIKEY);
|
||||
|
||||
export async function POST(req: Request) {
|
||||
const body = await req.json();
|
||||
|
||||
try {
|
||||
const { number } = body;
|
||||
|
||||
if (!number) {
|
||||
return NextResponse.json({
|
||||
success: false,
|
||||
error: "Missing required fields.",
|
||||
});
|
||||
}
|
||||
|
||||
const data = await resend.emails.send({
|
||||
from: `+${number} <onboarding@resend.dev>`,
|
||||
to: ["bagasbanuna02@gmail.com"], // ganti sesuai email kamu
|
||||
// cc: ["bip.baliinteraktifperkasa@gmail.com"],
|
||||
subject: "Delete Account",
|
||||
html: `
|
||||
<div style="font-family: Arial, sans-serif; font-size: 16px; color: #333;">
|
||||
<h3>New Message to Delete Account</h3>
|
||||
<p><strong>User with phone number +${number}</strong></p>
|
||||
<p><strong>Description: Want to delete account !!</strong></p>
|
||||
</div>
|
||||
`,
|
||||
});
|
||||
|
||||
return NextResponse.json({ success: true, data });
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return NextResponse.json({
|
||||
success: false,
|
||||
error: (error as Error).message,
|
||||
});
|
||||
}
|
||||
}
|
||||
41
src/app/api/helper/support-center/route.ts
Normal file
41
src/app/api/helper/support-center/route.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { Resend } from "resend";
|
||||
|
||||
const resend = new Resend(process.env.RESEND_APIKEY);
|
||||
|
||||
export async function POST(req: Request) {
|
||||
const body = await req.json();
|
||||
|
||||
try {
|
||||
const { email, title, description } = body;
|
||||
|
||||
if (!email || !title || !description) {
|
||||
return NextResponse.json({
|
||||
success: false,
|
||||
error: "Missing required fields.",
|
||||
});
|
||||
}
|
||||
|
||||
const data = await resend.emails.send({
|
||||
from: `${email} <onboarding@resend.dev>`,
|
||||
to: ["bip.baliinteraktifperkasa@gmail.com"], // ganti sesuai email kamu
|
||||
subject: title,
|
||||
html: `
|
||||
<div style="font-family: Arial, sans-serif; font-size: 16px; color: #333;">
|
||||
<h3>New Message Received</h3>
|
||||
<p><strong>Email:</strong> ${email}</p>
|
||||
<p><strong>Title:</strong> ${title}</p>
|
||||
<p><strong>Description:</strong><br/>${description.replace(/\n/g, "<br/>")}</p>
|
||||
</div>
|
||||
`,
|
||||
});
|
||||
|
||||
return NextResponse.json({ success: true, data });
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return NextResponse.json({
|
||||
success: false,
|
||||
error: (error as Error).message,
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user