Skip to content

Commit ad06978

Browse files
prod fixes
1 parent 1618a6d commit ad06978

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

backend/controllers/organizationController.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,8 @@ export const approveOrganization = async (req: AuthenticatedRequest, res: Respon
446446
if (existingClerkUsers.data && existingClerkUsers.data.length > 0) {
447447
console.log('[APPROVE] Email already exists in Clerk');
448448
return res.status(400).json({
449-
error: 'This email is already registered in the system. If this organization was previously deleted, please contact support.',
449+
error:
450+
'This email is already registered in the system. If this organization was previously deleted, please contact support.',
450451
});
451452
}
452453
} catch (clerkCheckError) {

frontend/src/hooks/queries/useDashboardData.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const useDashboardData = () => {
3535
const orgProfile = results[0].data;
3636
const orgId = orgProfile?.id;
3737

38-
const { data: surveyResponses } = useQuery({
38+
const { data: surveyResponsesData } = useQuery({
3939
queryKey: ['survey-responses', 'organization', orgId],
4040
queryFn: () => api.get(`/api/survey-responses/organization/${orgId}`),
4141
enabled: !!orgId,
@@ -46,11 +46,11 @@ export const useDashboardData = () => {
4646

4747
return {
4848
orgProfile,
49-
alerts: results[1].data,
50-
surveys: results[2].data,
51-
surveyResponses,
52-
announcements: results[3].data,
53-
blogs: results[4].data,
49+
alerts: results[1].data?.data || results[1].data || [],
50+
surveys: results[2].data || [],
51+
surveyResponses: surveyResponsesData?.data || surveyResponsesData || [],
52+
announcements: results[3].data || [],
53+
blogs: results[4].data || [],
5454
isLoading,
5555
isError,
5656
};

0 commit comments

Comments
 (0)