chore(deps): update drizzle-orm to 0.45.2 and pg to 8.20.0

This commit is contained in:
2026-04-22 14:23:34 +02:00
parent 0a3069762d
commit 41bc419a95
12 changed files with 49 additions and 25 deletions
@@ -1,7 +1,7 @@
import { Handlers } from "$fresh/server.ts";
import { db } from "$root/databases/db.ts";
import { mobility, promotions, students } from "$root/databases/schema.ts";
import { eq } from "npm:drizzle-orm";
import { eq } from "npm:drizzle-orm@0.45.2";
export const handler: Handlers = {
async GET() {
@@ -21,7 +21,11 @@ export const handler: Handlers = {
const mobilityRows = await db.select().from(mobility);
const promotionRows = await db
.select({ id: promotions.id, endyear: promotions.endyear, current: promotions.current })
.select({
id: promotions.id,
endyear: promotions.endyear,
current: promotions.current,
})
.from(promotions);
return new Response(
@@ -107,7 +111,9 @@ export const handler: Handlers = {
});
}
return new Response("Data inserted/updated successfully", { status: 200 });
return new Response("Data inserted/updated successfully", {
status: 200,
});
} catch (error) {
console.error("Error inserting mobility data:", error);
return new Response("Failed to insert/update data", { status: 500 });