feat: implement blood glucose tracking form and API with MariaDB database support

This commit is contained in:
jeremy bayse
2026-04-27 11:59:25 +02:00
parent 8df7a5ace8
commit f0ff0ce268
9 changed files with 185 additions and 471 deletions

View File

@@ -1,9 +1,9 @@
import { NextResponse } from "next/server";
import { auth } from "@/lib/auth";
import { prisma } from "@/lib/prisma";
import type { Moment } from "@/lib/glycemia";
import { MOMENTS, type Moment } from "@/lib/glycemia";
const VALID_MOMENTS: Moment[] = ["FASTING", "LUNCH", "DINNER"];
const VALID_MOMENTS = MOMENTS.map(m => m.value);
export async function GET(request: Request) {
const session = await auth();