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
View File
@@ -2,7 +2,6 @@ import { FreshContext, Handlers } from "$fresh/server.ts";
import { db } from "$root/databases/db.ts";
import { promotions } from "$root/databases/schema.ts";
import { AuthenticatedState } from "$root/defaults/interfaces.ts";
import { eq } from "npm:drizzle-orm";
export const handler: Handlers<null, AuthenticatedState> = {
// #13 GET /promotions
@@ -2,7 +2,7 @@ import { FreshContext, Handlers } from "$fresh/server.ts";
import { db } from "$root/databases/db.ts";
import { promotions } from "$root/databases/schema.ts";
import { AuthenticatedState } from "$root/defaults/interfaces.ts";
import { eq } from "npm:drizzle-orm";
import { eq } from "npm:drizzle-orm@0.45.2";
const NOT_FOUND = new Response(
JSON.stringify({ error: "Ressource introuvable" }),
+7 -3
View File
@@ -2,7 +2,7 @@ import { FreshContext, Handlers } from "$fresh/server.ts";
import { db } from "$root/databases/db.ts";
import { students } from "$root/databases/schema.ts";
import { AuthenticatedState } from "$root/defaults/interfaces.ts";
import { eq } from "npm:drizzle-orm";
import { eq } from "npm:drizzle-orm@0.45.2";
export const handler: Handlers<null, AuthenticatedState> = {
// #7 GET /students
@@ -37,8 +37,12 @@ export const handler: Handlers<null, AuthenticatedState> = {
return new Response(null, { status: 403 });
}
const body: { numEtud: number; nom: string; prenom: string; idPromo: string } =
await request.json();
const body: {
numEtud: number;
nom: string;
prenom: string;
idPromo: string;
} = await request.json();
if (!body.nom || !body.prenom || !body.idPromo) {
return new Response(null, { status: 400 });
@@ -2,7 +2,7 @@ import { FreshContext, Handlers } from "$fresh/server.ts";
import { db } from "$root/databases/db.ts";
import { students } from "$root/databases/schema.ts";
import { AuthenticatedState } from "$root/defaults/interfaces.ts";
import { eq } from "npm:drizzle-orm";
import { eq } from "npm:drizzle-orm@0.45.2";
const NOT_FOUND = new Response(
JSON.stringify({ error: "Ressource introuvable" }),
@@ -45,8 +45,8 @@ export const handler: Handlers<null, AuthenticatedState> = {
}
const numEtud = Number(context.params.numEtud);
const body: { nom: string; prenom: string; idPromo: string } =
await request.json();
const body: { nom: string; prenom: string; idPromo: string } = await request
.json();
const [updated] = await db
.update(students)