diff --git a/src/actions/brandActions.ts b/src/actions/brandActions.ts index 0446835..b10c83b 100644 --- a/src/actions/brandActions.ts +++ b/src/actions/brandActions.ts @@ -1,10 +1,10 @@ "use server"; -import { eq, not } from "drizzle-orm"; +import { eq, not , asc} from "drizzle-orm"; import { revalidatePath } from "next/cache"; import { db } from "../db"; import { brand } from "../db/schema/Brand"; export const getData = async () => { - const data = await db.select().from(brand); + const data = await db.select().from(brand).orderBy(asc(brand.name)); return data; }; export const addBrand = async ( name: string) => {