chore: clean up code formatting and remove unnecessary whitespace across multiple files for improved readability
This commit is contained in:
@@ -49,7 +49,11 @@ export async function getMotivatorSessionsByUserId(userId: string) {
|
||||
]);
|
||||
|
||||
// Mark owned sessions and merge with shared
|
||||
const ownedWithRole = owned.map((s) => ({ ...s, isOwner: true as const, role: 'OWNER' as const }));
|
||||
const ownedWithRole = owned.map((s) => ({
|
||||
...s,
|
||||
isOwner: true as const,
|
||||
role: 'OWNER' as const,
|
||||
}));
|
||||
const sharedWithRole = shared.map((s) => ({
|
||||
...s.session,
|
||||
isOwner: false as const,
|
||||
@@ -200,10 +204,7 @@ export async function updateMotivatorCard(
|
||||
});
|
||||
}
|
||||
|
||||
export async function reorderMotivatorCards(
|
||||
sessionId: string,
|
||||
cardIds: string[]
|
||||
) {
|
||||
export async function reorderMotivatorCards(sessionId: string, cardIds: string[]) {
|
||||
const updates = cardIds.map((id, index) =>
|
||||
prisma.motivatorCard.update({
|
||||
where: { id },
|
||||
@@ -350,4 +351,3 @@ export async function getLatestMotivatorEventTimestamp(sessionId: string) {
|
||||
});
|
||||
return event?.createdAt;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user