mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-06 02:36:44 -05:00
fixed sort
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
"use server";
|
"use server";
|
||||||
import { eq, not } from "drizzle-orm";
|
import { eq, not , asc} from "drizzle-orm";
|
||||||
import { revalidatePath } from "next/cache";
|
import { revalidatePath } from "next/cache";
|
||||||
import { db } from "../db";
|
import { db } from "../db";
|
||||||
import { brand } from "../db/schema/Brand";
|
import { brand } from "../db/schema/Brand";
|
||||||
export const getData = async () => {
|
export const getData = async () => {
|
||||||
const data = await db.select().from(brand);
|
const data = await db.select().from(brand).orderBy(asc(brand.name));
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
export const addBrand = async ( name: string) => {
|
export const addBrand = async ( name: string) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user