feat(groups): add home board settings (#2321)
This commit is contained in:
11
packages/db/queries/group.ts
Normal file
11
packages/db/queries/group.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
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);
|
||||
};
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from "./item";
|
||||
export * from "./server-setting";
|
||||
export * from "./group";
|
||||
|
||||
Reference in New Issue
Block a user