2.2.1 - Misc improvements and cleanup
All checks were successful
Docker Deploy / build-and-push (push) Successful in 4m3s
All checks were successful
Docker Deploy / build-and-push (push) Successful in 4m3s
This commit is contained in:
@@ -20,7 +20,6 @@ export const GET: APIRoute = async ({ params, locals }) => {
|
||||
return new Response("Unauthorized", { status: 401 });
|
||||
}
|
||||
|
||||
// Fetch invoice with related data
|
||||
const invoiceResult = await db
|
||||
.select({
|
||||
invoice: invoices,
|
||||
@@ -39,7 +38,6 @@ export const GET: APIRoute = async ({ params, locals }) => {
|
||||
|
||||
const { invoice, client, organization } = invoiceResult;
|
||||
|
||||
// Verify access
|
||||
const membership = await db
|
||||
.select()
|
||||
.from(members)
|
||||
@@ -55,7 +53,6 @@ export const GET: APIRoute = async ({ params, locals }) => {
|
||||
return new Response("Forbidden", { status: 403 });
|
||||
}
|
||||
|
||||
// Fetch items
|
||||
const items = await db
|
||||
.select()
|
||||
.from(invoiceItems)
|
||||
@@ -66,8 +63,6 @@ export const GET: APIRoute = async ({ params, locals }) => {
|
||||
return new Response("Client not found", { status: 404 });
|
||||
}
|
||||
|
||||
// Generate PDF using Vue PDF
|
||||
// Suppress verbose logging from PDF renderer
|
||||
const originalConsoleLog = console.log;
|
||||
const originalConsoleWarn = console.warn;
|
||||
console.log = () => {};
|
||||
@@ -83,7 +78,6 @@ export const GET: APIRoute = async ({ params, locals }) => {
|
||||
|
||||
const stream = await renderToStream(pdfDocument);
|
||||
|
||||
// Restore console.log
|
||||
console.log = originalConsoleLog;
|
||||
console.warn = originalConsoleWarn;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user