Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correction et ajout de certains types manquants #1464

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

m-maillot
Copy link
Contributor

No description provided.

@m-maillot m-maillot requested review from Viczei and maxgfr September 4, 2024 08:56
Copy link

sonarcloud bot commented Sep 4, 2024

@@ -0,0 +1,74 @@
import { Theme, ThemeContentRelation } from "../types/themes";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai migré le fichier buildTheme en typescript.

@@ -18,7 +18,8 @@ const graphQLThemesQuery = `
slug
source
title
document
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai modifié la requête hasura pour fetch les thèmes car elle récupérait les documents complets alors que l'on utilise que la description et l'url. Ca fait un json beaucoup plus léger !

@@ -6,7 +8,7 @@ export interface Theme {
cdtnId: string;
id: string;
slug: string;
source: string;
source: "themes";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On est dans un thème, la source ne peut être que themes.

type: "external",
}))
.map(
(item): MailTemplateReference => ({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ici j'ai du ajouter le type de retour car Typescript n'arrivait pas à matcher le typeavec external 🤷

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dommage qu'on ait pas pu repondre les types dans le package partagé

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ce sont des types lié à la BDD. Actuellement, ils ne sont pas dans le shared. Il faudrait les ajouter en effet pour avoir chaque layer de dispo

Copy link

github-actions bot commented Sep 4, 2024

🎉 Deployment for commit e3fa73b :

Ingresses
Docker images
  • 📦 docker pull harbor.fabrique.social.gouv.fr/cdtn/cdtn-admin/export:sha-e3fa73b85b3f7169448f6a24fe3f63d4abcdd1d5
  • 📦 docker pull harbor.fabrique.social.gouv.fr/cdtn/cdtn-admin/frontend:sha-e3fa73b85b3f7169448f6a24fe3f63d4abcdd1d5
  • 📦 docker pull harbor.fabrique.social.gouv.fr/cdtn/cdtn-admin/hasura:sha-e3fa73b85b3f7169448f6a24fe3f63d4abcdd1d5
Debug

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@m-maillot m-maillot merged commit 78cce2a into master Sep 4, 2024
30 checks passed
@m-maillot m-maillot deleted the fix/add-types branch September 4, 2024 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants