Bereinige und vereinfache Installations-Skripte
- Entferne alle überflüssigen Installations- und Konfigurationsskripte - Erstelle zwei vereinfachte Docker-Installationsskripte: - install-frontend.sh für Frontend-Installation - install-backend.sh für Backend-Installation - Verbessere Frontend Dockerfile mit besserer Unterstützung für native Dependencies - Aktualisiere Backend Dockerfile für automatische DB-Initialisierung - Korrigiere TypeScript-Fehler in personalized-cards.tsx - Erstelle env.ts für Umgebungsvariablen-Verwaltung - Füge ausführliche Installationsanleitung in INSTALL.md hinzu - Konfiguriere Docker-Compose für Host-Netzwerkmodus - Erweitere Dockerfiles mit Healthchecks für bessere Zuverlässigkeit 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
7
packages/reservation-platform/src/app/api/job/[jobId]/remaining-time/route.ts
Executable file → Normal file
7
packages/reservation-platform/src/app/api/job/[jobId]/remaining-time/route.ts
Executable file → Normal file
@@ -2,19 +2,12 @@ import { db } from "@/server/db";
|
||||
import { printJobs } from "@/server/db/schema";
|
||||
import { eq } from "drizzle-orm";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
interface RemainingTimeRouteProps {
|
||||
params: {
|
||||
jobId: string;
|
||||
};
|
||||
}
|
||||
export async function GET(request: Request, { params }: RemainingTimeRouteProps) {
|
||||
// Trying to fix build error in container...
|
||||
if (params.jobId === undefined) {
|
||||
return Response.json({});
|
||||
}
|
||||
|
||||
// Get the job details
|
||||
const jobDetails = await db.query.printJobs.findFirst({
|
||||
where: eq(printJobs.id, params.jobId),
|
||||
|
||||
21
packages/reservation-platform/src/app/api/printers/route.ts
Executable file → Normal file
21
packages/reservation-platform/src/app/api/printers/route.ts
Executable file → Normal file
@@ -1,22 +1,7 @@
|
||||
import { backendApi } from "@/utils/fetch";
|
||||
import { mapBackendPrinterToFrontend } from "@/utils/backend-types";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
import { getPrinters } from "@/server/actions/printers";
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
// Hole Drucker vom Backend statt aus der lokalen Datenbank
|
||||
const backendPrinters = await backendApi.printers.getAll();
|
||||
|
||||
// Transformiere die Backend-Daten ins Frontend-Format
|
||||
const printers = backendPrinters.map(mapBackendPrinterToFrontend);
|
||||
const printers = await getPrinters();
|
||||
|
||||
return Response.json(printers);
|
||||
} catch (error) {
|
||||
console.error("Fehler beim Abrufen der Drucker vom Backend:", error);
|
||||
return Response.json(
|
||||
{ error: "Fehler beim Abrufen der Drucker vom Backend" },
|
||||
{ status: 500 }
|
||||
);
|
||||
}
|
||||
return Response.json(printers);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user