v1 softlaunch

This commit is contained in:
2026-05-05 10:39:59 -04:00
parent 6023fe5214
commit 6fd8b0317e
26 changed files with 1070 additions and 10 deletions

View File

@@ -1,4 +1,5 @@
import { notFound, redirect } from "next/navigation";
import { auth } from "@/auth";
import { db } from "@/lib/db";
import {
centsToDollars,
@@ -9,6 +10,7 @@ import {
parseTags,
tagsToInputValue,
} from "@/lib/forms";
import { audit } from "@/lib/audit";
import { ServiceForm, type ServiceFormValues } from "../_form";
export const metadata = { title: "Edit service — TouchBase" };
@@ -35,6 +37,14 @@ async function updateService(formData: FormData): Promise<void> {
active: parseBool(formData.get("active")),
},
});
const session = await auth();
await audit(db, {
actorId: session?.user?.id ?? null,
action: "service.updated",
entityType: "Service",
entityId: id,
meta: { name },
});
redirect("/admin/services");
}