From af37f8a86348c2635b622bc256c00d2524c94ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Mur=C3=A7a?= Date: Sat, 17 Sep 2022 15:32:06 -0300 Subject: [PATCH] Fix upcoming assignments mock fetching --- src/services/mocks.js | 2 +- src/services/user-service.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/mocks.js b/src/services/mocks.js index 3c949b0..12f285c 100644 --- a/src/services/mocks.js +++ b/src/services/mocks.js @@ -144,7 +144,7 @@ const allAssignments = [ classrooms: allClassrooms.filter(c => c.id === '666'), }, { - id: '1234', + id: '9283764', type: 'assessment', title: 'Atividade 2 - Estudo de caso Sapiens Informática', description: diff --git a/src/services/user-service.js b/src/services/user-service.js index ad39483..d256832 100644 --- a/src/services/user-service.js +++ b/src/services/user-service.js @@ -38,8 +38,8 @@ const getUpcomingAssignmentsByClassId = classId => sleep(300).then(() => { console.log('Getting upcoming assignments by class id ' + classId); return { - data: allUpcomingAssignments.filter(a => - a.classrooms.filter(c => c.id === classId) + data: allUpcomingAssignments.filter( + a => a.classrooms.filter(c => c.id === classId)[0] ), }; });