diff --git a/back/src/oidc-client/oidc-client.controller.ts b/back/src/oidc-client/oidc-client.controller.ts index 9d4b3b8..dee1e70 100644 --- a/back/src/oidc-client/oidc-client.controller.ts +++ b/back/src/oidc-client/oidc-client.controller.ts @@ -20,6 +20,7 @@ export class OidcClientController { async findAll() { return [ { + id: 123, clientDescription: 'Description', clientId: 'clientId', clientSecret: 'ClientSecret', @@ -34,6 +35,7 @@ export class OidcClientController { @Get('/:id') async find_by_id(@Param('id') id: string) { return { + id: 123, clientDescription: 'Description', clientId: 'clientId', clientSecret: 'ClientSecret', @@ -57,7 +59,7 @@ export class OidcClientController { HttpStatus.BAD_REQUEST, { cause: error, - } + }, ); } } diff --git a/back/src/oidc-client/oidc-client.dto.ts b/back/src/oidc-client/oidc-client.dto.ts index 2912918..cf353dd 100644 --- a/back/src/oidc-client/oidc-client.dto.ts +++ b/back/src/oidc-client/oidc-client.dto.ts @@ -3,6 +3,9 @@ import { IsNotEmpty } from 'class-validator'; export class CreateOidcClientDto { clientDescription: string | null; + @IsNotEmpty() + id: number; + @IsNotEmpty() clientName: string; diff --git a/front/src/providers/connectedSpaces/Dashboard.tsx b/front/src/providers/connectedSpaces/Dashboard.tsx index b4bfb18..ac3abac 100644 --- a/front/src/providers/connectedSpaces/Dashboard.tsx +++ b/front/src/providers/connectedSpaces/Dashboard.tsx @@ -1,61 +1,40 @@ import { Badge } from '@codegouvfr/react-dsfr/Badge'; import Title1 from '../../titles/Title1'; import { Card } from '@codegouvfr/react-dsfr/Card'; +import { useRouteLoaderData } from 'react-router-dom'; export const Dashboard = () => { + const oidcClients = useRouteLoaderData('dashboard'); return (