refactor: alinha features financeiras ao novo naming

This commit is contained in:
Felipe Coutinho
2026-03-14 12:50:55 +00:00
parent ef918a3667
commit 67ad4b9d02
51 changed files with 876 additions and 898 deletions

View File

@@ -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,