• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

inclusion-numerique / coop-mediation-numerique / 47b77ff3-bc71-4025-a464-77250a49db92

29 Jan 2026 09:49AM UTC coverage: 10.721% (+3.3%) from 7.44%
47b77ff3-bc71-4025-a464-77250a49db92

push

circleci

web-flow
Merge pull request #398 from inclusion-numerique/dev

release

628 of 9623 branches covered (6.53%)

Branch coverage included in aggregate %.

73 of 118 new or added lines in 12 files covered. (61.86%)

786 existing lines in 84 files now uncovered.

1991 of 14805 relevant lines covered (13.45%)

1.86 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/apps/web/src/features/dataspace/updateUserInscriptionProfileFromDataspace.ts
1
import {
2
  PrismaSessionUser,
3
  sessionUserSelect,
4
} from '@app/web/auth/getSessionUserFromSessionToken'
5
import type { DataspaceMediateur } from '@app/web/external-apis/dataspace/dataspaceApiClient'
6
import { getProfileFromDataspace } from '@app/web/features/dataspace/getProfileFromDataspace'
7
import { prismaClient } from '@app/web/prismaClient'
8
import type { ProfilInscription } from '@prisma/client'
9

10
/**
11
 * Update user's checked profile inscription based on Dataspace data
12
 */
UNCOV
13
export const updateUserInscriptionProfileFromDataspace = async ({
×
14
  user,
15
  dataspaceData,
16
}: {
17
  user: { id: string }
18
  dataspaceData: DataspaceMediateur | null
19
}): Promise<PrismaSessionUser & { profilInscription: ProfilInscription }> =>
20
  prismaClient.user
×
21
    .update({
22
      where: { id: user.id },
23
      data: {
24
        profilInscription: getProfileFromDataspace({
25
          dataspaceData,
26
        }),
27
        isConseillerNumerique: dataspaceData?.is_conseiller_numerique ?? false,
×
28
        dataspaceUserId: dataspaceData?.id,
29
        dataspaceUserIdPg: dataspaceData?.pg_id,
30
      },
31
      select: sessionUserSelect,
32
    })
33
    .then((updatedUser) => {
34
      if (!updatedUser.profilInscription) {
×
35
        throw new Error('Could not update user profile')
×
36
      }
37
      return updatedUser as PrismaSessionUser & {
×
38
        profilInscription: ProfilInscription
39
      }
40
    })
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc