chore: strip debug console.log/error statements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
efe19f0cda
commit
4889ead690
5 changed files with 11 additions and 18 deletions
|
|
@ -296,8 +296,7 @@ export async function POST(request: NextRequest) {
|
|||
success: true,
|
||||
message: "Tak! Vi har modtaget din anmodning og sendt en bekræftelse til din email.",
|
||||
})
|
||||
} catch (error) {
|
||||
console.error("Quote request error:", error)
|
||||
} catch {
|
||||
return NextResponse.json({ error: "Der opstod en fejl. Prøv igen senere." }, { status: 500 })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@ export async function GET() {
|
|||
|
||||
const quotes = getAllQuotes()
|
||||
return NextResponse.json({ quotes })
|
||||
} catch (error) {
|
||||
console.error("Get quotes error:", error)
|
||||
} catch {
|
||||
return NextResponse.json({ error: "Der opstod en fejl" }, { status: 500 })
|
||||
}
|
||||
}
|
||||
|
|
@ -41,8 +40,7 @@ export async function PATCH(request: NextRequest) {
|
|||
}
|
||||
|
||||
return NextResponse.json({ success: true })
|
||||
} catch (error) {
|
||||
console.error("Update quote error:", error)
|
||||
} catch {
|
||||
return NextResponse.json({ error: "Der opstod en fejl" }, { status: 500 })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,10 +36,6 @@ export default function AdminPage() {
|
|||
setIsRequestingQuote(true)
|
||||
try {
|
||||
await new Promise((resolve) => setTimeout(resolve, 500))
|
||||
console.log("Quote request (test mode):", {
|
||||
customerInfo,
|
||||
calculationDetails: calculationResult,
|
||||
})
|
||||
alert("TEST MODE: Tilbudsanmodning ville blive sendt til info@foamking.dk")
|
||||
} catch (error) {
|
||||
alert("Der opstod en fejl. Prøv igen senere.")
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ export default function HistorikPage() {
|
|||
}
|
||||
const data = await res.json()
|
||||
setQuotes(data.quotes)
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch quotes:", error)
|
||||
} catch {
|
||||
// fetch failed
|
||||
} finally {
|
||||
setLoading(false)
|
||||
}
|
||||
|
|
@ -59,8 +59,8 @@ export default function HistorikPage() {
|
|||
await fetch("/api/auth/logout", { method: "POST" })
|
||||
router.push("/intern/login")
|
||||
router.refresh()
|
||||
} catch (error) {
|
||||
console.error("Logout failed:", error)
|
||||
} catch {
|
||||
// logout failed
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ export default function DashboardPage() {
|
|||
}
|
||||
const data = await res.json()
|
||||
setQuotes(data.quotes)
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch quotes:", error)
|
||||
} catch {
|
||||
// fetch failed
|
||||
} finally {
|
||||
setLoading(false)
|
||||
}
|
||||
|
|
@ -86,8 +86,8 @@ export default function DashboardPage() {
|
|||
await fetch("/api/auth/logout", { method: "POST" })
|
||||
router.push("/intern/login")
|
||||
router.refresh()
|
||||
} catch (error) {
|
||||
console.error("Logout failed:", error)
|
||||
} catch {
|
||||
// logout failed
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue