Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

441 B
Raw Blame
import { randomUUID } from "node:crypto";
import db, { schema } from "../../../../apps/api/src/database";

export async function createInstanceAdmin() {
  const userId = `admin-${randomUUID()}`;
  const [user] = await db
    .insert(schema.userTable)
    .values({
      id: userId,
      email: `${userId}@example.com`,
      emailVerified: true,
      name: "Instance Admin",
      role: "admin",
    })
    .returning();
  return user;
}