fix(build): resolve ESLint and type errors causing build failure

This commit is contained in:
2026-04-01 17:44:48 +08:00
parent b751f031cd
commit 8777c45a44
7 changed files with 14 additions and 13 deletions

View File

@@ -43,7 +43,6 @@ export async function POST(req: Request) {
try {
const res = await fetch(waUrl);
if (!res.ok) {
const errorText = await res.text();
console.error(`⚠️ WA Service HTTP Error: ${res.status} ${res.statusText}. Continuing since OTP is logged.`);
console.log(`💡 Use this OTP to login: ${codeOtp}`);
} else {
@@ -53,8 +52,9 @@ export async function POST(req: Request) {
console.error("⚠️ WA Service Logic Error:", sendWa);
}
}
} catch (waError: any) {
console.error("⚠️ WA Connection Exception. Continuing since OTP is logged.", waError.message);
} catch (waError: unknown) {
const errorMessage = waError instanceof Error ? waError.message : String(waError);
console.error("⚠️ WA Connection Exception. Continuing since OTP is logged.", errorMessage);
}
const createOtpId = await prisma.kodeOtp.create({

View File

@@ -35,8 +35,9 @@ export async function POST(req: Request) {
const waData = await waRes.json();
console.log("📱 WA Response (Register):", waData);
}
} catch (waError: any) {
console.warn("⚠️ WA Connection Exception (Register). Continuing since OTP is logged.", waError.message);
} catch (waError: unknown) {
const errorMessage = waError instanceof Error ? waError.message : String(waError);
console.warn("⚠️ WA Connection Exception (Register). Continuing since OTP is logged.", errorMessage);
}
// ✅ Simpan OTP ke database

View File

@@ -31,8 +31,9 @@ export async function POST(req: Request) {
const waData = await waRes.json();
console.log("📱 WA Response (Resend):", waData);
}
} catch (waError: any) {
console.warn("⚠️ WA Connection Exception (Resend). Continuing since OTP is logged.", waError.message);
} catch (waError: unknown) {
const errorMessage = waError instanceof Error ? waError.message : String(waError);
console.warn("⚠️ WA Connection Exception (Resend). Continuing since OTP is logged.", errorMessage);
}
// Simpan OTP ke database

View File

@@ -34,8 +34,9 @@ export async function POST(req: Request) {
const sendWa = await res.json();
console.log("📱 WA Response (SendOTPRegister):", sendWa);
}
} catch (waError: any) {
console.warn("⚠️ WA Connection Exception (SendOTPRegister). Continuing since OTP is logged.", waError.message);
} catch (waError: unknown) {
const errorMessage = waError instanceof Error ? waError.message : String(waError);
console.warn("⚠️ WA Connection Exception (SendOTPRegister). Continuing since OTP is logged.", errorMessage);
}
// Simpan OTP

View File

@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Paper, Title, Progress, Stack, Text, Group, Box, rem } from '@mantine/core'
import { Paper, Title, Progress, Stack, Text, Group, Box } from '@mantine/core'
import { IconArrowUpRight, IconArrowDownRight } from '@tabler/icons-react'
import { APBDes, APBDesItem, SummaryData } from '../types/apbdes'
import { APBDes, APBDesItem } from '../types/apbdes'
interface SummaryProps {
title: string

View File

@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Paper, Table, Title, Box, ScrollArea, Badge } from '@mantine/core'
import { APBDes, APBDesItem } from '../types/apbdes'

View File

@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Paper, Table, Title, Badge, Text, Box, ScrollArea } from '@mantine/core'
import { APBDes, APBDesItem, RealisasiItem } from '../types/apbdes'