Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

324 B
Raw Blame
import { max } from "drizzle-orm";

import type { HomarrDatabase } from "../driver";
import { groups } from "../schema";

export const getMaxGroupPositionAsync = async (db: HomarrDatabase) => {
  return await db
    .select({ value: max(groups.position) })
    .from(groups)
    .then((result) => result[0]?.value ?? 1);
};