chore: clean up code formatting and remove unnecessary whitespace across multiple files for improved readability

This commit is contained in:
Julien Froidefond
2025-12-05 11:05:14 +01:00
parent b3157fffbd
commit 71d850c985
65 changed files with 347 additions and 505 deletions

View File

@@ -15,10 +15,7 @@ export async function createMotivatorSession(data: { title: string; participant:
}
try {
const motivatorSession = await motivatorsService.createMotivatorSession(
session.user.id,
data
);
const motivatorSession = await motivatorsService.createMotivatorSession(session.user.id, data);
revalidatePath('/motivators');
return { success: true, data: motivatorSession };
} catch (error) {
@@ -89,10 +86,7 @@ export async function updateMotivatorCard(
}
// Check edit permission
const canEdit = await motivatorsService.canEditMotivatorSession(
sessionId,
authSession.user.id
);
const canEdit = await motivatorsService.canEditMotivatorSession(sessionId, authSession.user.id);
if (!canEdit) {
return { success: false, error: 'Permission refusée' };
}
@@ -132,10 +126,7 @@ export async function reorderMotivatorCards(sessionId: string, cardIds: string[]
}
// Check edit permission
const canEdit = await motivatorsService.canEditMotivatorSession(
sessionId,
authSession.user.id
);
const canEdit = await motivatorsService.canEditMotivatorSession(sessionId, authSession.user.id);
if (!canEdit) {
return { success: false, error: 'Permission refusée' };
}
@@ -159,11 +150,7 @@ export async function reorderMotivatorCards(sessionId: string, cardIds: string[]
}
}
export async function updateCardInfluence(
cardId: string,
sessionId: string,
influence: number
) {
export async function updateCardInfluence(cardId: string, sessionId: string, influence: number) {
return updateMotivatorCard(cardId, sessionId, { influence });
}
@@ -192,8 +179,7 @@ export async function shareMotivatorSession(
return { success: true, data: share };
} catch (error) {
console.error('Error sharing motivator session:', error);
const message =
error instanceof Error ? error.message : 'Erreur lors du partage';
const message = error instanceof Error ? error.message : 'Erreur lors du partage';
return { success: false, error: message };
}
}
@@ -205,11 +191,7 @@ export async function removeMotivatorShare(sessionId: string, shareUserId: strin
}
try {
await motivatorsService.removeMotivatorShare(
sessionId,
authSession.user.id,
shareUserId
);
await motivatorsService.removeMotivatorShare(sessionId, authSession.user.id, shareUserId);
revalidatePath(`/motivators/${sessionId}`);
return { success: true };
} catch (error) {
@@ -217,4 +199,3 @@ export async function removeMotivatorShare(sessionId: string, shareUserId: strin
return { success: false, error: 'Erreur lors de la suppression du partage' };
}
}