From 27deb2fadbbe4e5a176f701772128fde623337a1 Mon Sep 17 00:00:00 2001 From: admtracksteel Date: Thu, 27 Aug 2026 16:50:56 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20Auto-deploy:=20GPI=20atualizado?= =?UTF-8?q?=20em=2027/08/2026=2016:50:56?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/pages/YieldStudyDashboard.tsx | 8 ++++---- src/server/routes/userRoutes.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/pages/YieldStudyDashboard.tsx b/src/client/pages/YieldStudyDashboard.tsx index 3ad93d4..ac97104 100644 --- a/src/client/pages/YieldStudyDashboard.tsx +++ b/src/client/pages/YieldStudyDashboard.tsx @@ -112,7 +112,7 @@ export const YieldStudyDashboard: React.FC = () => { ...s, categories: (s.categories || []).map(cat => ({ ...cat, - id: cat.id || (cat as any)._id // Garante ID único + id: cat.id || (cat as { _id?: string })._id // Garante ID único })) })); @@ -158,7 +158,7 @@ export const YieldStudyDashboard: React.FC = () => { const res = await yieldStudyService.createStudy(newStudy); const normalized = { ...res.data, - categories: res.data.categories.map((cat: any) => ({ + categories: res.data.categories.map((cat: PieceCategory & { _id?: string }) => ({ ...cat, id: cat.id || cat._id })) @@ -226,7 +226,7 @@ export const YieldStudyDashboard: React.FC = () => { // 1. Aplica a atualização na categoria específica const newCategories = selectedStudy.categories.map(c => { - const currentId = c.id || (c as any)._id; + const currentId = c.id || (c as { _id?: string })._id; return currentId === id ? { ...c, ...updates } : c; }); @@ -432,7 +432,7 @@ export const YieldStudyDashboard: React.FC = () => { ...study, categories: study.categories.map(cat => ({ ...cat, - id: cat.id || (cat as any)._id + id: cat.id || (cat as { _id?: string })._id })) }; setSelectedStudy(normalized); diff --git a/src/server/routes/userRoutes.ts b/src/server/routes/userRoutes.ts index cddf747..de69490 100644 --- a/src/server/routes/userRoutes.ts +++ b/src/server/routes/userRoutes.ts @@ -1,5 +1,5 @@ import express from 'express'; -import { syncUser, getCurrentUser, getAllUsers, updateUserRole, toggleBanUser, heartbeat, getActiveUsers, deleteUser, login } from '../controllers/userController.js'; +import { getCurrentUser, getAllUsers, updateUserRole, toggleBanUser, heartbeat, getActiveUsers, deleteUser, login } from '../controllers/userController.js'; import { requireAdmin } from '../middleware/authMiddleware.js'; const router = express.Router();