import { prisma } from "./db";
import { DEFAULT_INSTANCE_TYPE } from "./instanceTypes";

export async function getAdminSettings() {
  let settings = await prisma.adminSettings.findUnique({ where: { id: 1 } });
  if (!settings) {
    settings = await prisma.adminSettings.create({ data: { id: 1, defaultInstanceType: DEFAULT_INSTANCE_TYPE } });
  }
  return settings;
}
