add license system and ui

This commit is contained in:
miloschwartz 2025-04-27 13:03:00 -04:00
parent 80d76befc9
commit 4819f410e6
No known key found for this signature in database
46 changed files with 2159 additions and 94 deletions

View file

@ -0,0 +1,17 @@
import db from "@server/db";
import { hostMeta } from "@server/db/schemas";
import { v4 as uuidv4 } from "uuid";
export async function setHostMeta() {
const [existing] = await db.select().from(hostMeta).limit(1);
if (existing && existing.hostMetaId) {
return;
}
const id = uuidv4();
await db
.insert(hostMeta)
.values({ hostMetaId: id, createdAt: new Date().getTime() });
}