mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 19:01:47 +00:00
refactor: alinha features financeiras ao novo naming
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { eq } from "drizzle-orm";
|
||||
import { type Categoria, categorias } from "@/db/schema";
|
||||
import { type Category, categories } from "@/db/schema";
|
||||
import type { CategoryType } from "@/features/categories/components/types";
|
||||
import { db } from "@/shared/lib/db";
|
||||
|
||||
@@ -13,11 +13,11 @@ export type CategoryData = {
|
||||
export async function fetchCategoriesForUser(
|
||||
userId: string,
|
||||
): Promise<CategoryData[]> {
|
||||
const categoryRows = await db.query.categorias.findMany({
|
||||
where: eq(categorias.userId, userId),
|
||||
const categoryRows = await db.query.categories.findMany({
|
||||
where: eq(categories.userId, userId),
|
||||
});
|
||||
|
||||
return categoryRows.map((category: Categoria) => ({
|
||||
return categoryRows.map((category: Category) => ({
|
||||
id: category.id,
|
||||
name: category.name,
|
||||
type: category.type as CategoryType,
|
||||
|
||||
Reference in New Issue
Block a user