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,
|
success: true,
|
||||||
message: "Tak! Vi har modtaget din anmodning og sendt en bekræftelse til din email.",
|
message: "Tak! Vi har modtaget din anmodning og sendt en bekræftelse til din email.",
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch {
|
||||||
console.error("Quote request error:", error)
|
|
||||||
return NextResponse.json({ error: "Der opstod en fejl. Prøv igen senere." }, { status: 500 })
|
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()
|
const quotes = getAllQuotes()
|
||||||
return NextResponse.json({ quotes })
|
return NextResponse.json({ quotes })
|
||||||
} catch (error) {
|
} catch {
|
||||||
console.error("Get quotes error:", error)
|
|
||||||
return NextResponse.json({ error: "Der opstod en fejl" }, { status: 500 })
|
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 })
|
return NextResponse.json({ success: true })
|
||||||
} catch (error) {
|
} catch {
|
||||||
console.error("Update quote error:", error)
|
|
||||||
return NextResponse.json({ error: "Der opstod en fejl" }, { status: 500 })
|
return NextResponse.json({ error: "Der opstod en fejl" }, { status: 500 })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,10 +36,6 @@ export default function AdminPage() {
|
||||||
setIsRequestingQuote(true)
|
setIsRequestingQuote(true)
|
||||||
try {
|
try {
|
||||||
await new Promise((resolve) => setTimeout(resolve, 500))
|
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")
|
alert("TEST MODE: Tilbudsanmodning ville blive sendt til info@foamking.dk")
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
alert("Der opstod en fejl. Prøv igen senere.")
|
alert("Der opstod en fejl. Prøv igen senere.")
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,8 @@ export default function HistorikPage() {
|
||||||
}
|
}
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
setQuotes(data.quotes)
|
setQuotes(data.quotes)
|
||||||
} catch (error) {
|
} catch {
|
||||||
console.error("Failed to fetch quotes:", error)
|
// fetch failed
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false)
|
setLoading(false)
|
||||||
}
|
}
|
||||||
|
|
@ -59,8 +59,8 @@ export default function HistorikPage() {
|
||||||
await fetch("/api/auth/logout", { method: "POST" })
|
await fetch("/api/auth/logout", { method: "POST" })
|
||||||
router.push("/intern/login")
|
router.push("/intern/login")
|
||||||
router.refresh()
|
router.refresh()
|
||||||
} catch (error) {
|
} catch {
|
||||||
console.error("Logout failed:", error)
|
// logout failed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,8 @@ export default function DashboardPage() {
|
||||||
}
|
}
|
||||||
const data = await res.json()
|
const data = await res.json()
|
||||||
setQuotes(data.quotes)
|
setQuotes(data.quotes)
|
||||||
} catch (error) {
|
} catch {
|
||||||
console.error("Failed to fetch quotes:", error)
|
// fetch failed
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false)
|
setLoading(false)
|
||||||
}
|
}
|
||||||
|
|
@ -86,8 +86,8 @@ export default function DashboardPage() {
|
||||||
await fetch("/api/auth/logout", { method: "POST" })
|
await fetch("/api/auth/logout", { method: "POST" })
|
||||||
router.push("/intern/login")
|
router.push("/intern/login")
|
||||||
router.refresh()
|
router.refresh()
|
||||||
} catch (error) {
|
} catch {
|
||||||
console.error("Logout failed:", error)
|
// logout failed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue