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

Implements ProConnect #73

Merged
merged 25 commits into from
Dec 18, 2024
Merged

Implements ProConnect #73

merged 25 commits into from
Dec 18, 2024

Conversation

jrivals
Copy link
Collaborator

@jrivals jrivals commented Dec 9, 2024

No description provided.

@@ -146,8 +147,13 @@ const Header = () => {
))}
<Button
iconId="fr-icon-logout-box-r-line"
onClick={() => {
logout()(dispatch);
onClick={async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

On ne peut pas faire un lien qui tape le backend et que celui-ci fasse un joli HTTP_REDIRECT ?
Comme ça pas besoin de JS.

@jrivals jrivals changed the title Implements proConnect (WIP) Implements ProConnect Dec 17, 2024
@jrivals jrivals requested a review from vmaubert December 17, 2024 16:48

const user = await userRepository.findOne('[email protected]');
const user = await Users()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Je note, je vais corriger ça plus tard, en attendant ça me va.


await Users().insert([
{
id: uuidv4(),
email: '[email protected]',
email: 'admin@maestro.beta.gouv.fr',
Copy link
Collaborator

Choose a reason for hiding this comment

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

haaa donc on a déjà une boite mail pour tout le domaine maestro.beta.gouv.fr ?

return response.status(constants.HTTP_STATUS_OK).json(logoutUrl);
};

export default {
Copy link
Collaborator

Choose a reason for hiding this comment

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

C'est vraiment pas pratique le export default surtout pour du multiple export.

  • Pour supprimer/ajouter une méthode, faut le modifier la méthode ET le bas du fichier
  • Quand je suis sur une méthode, je ne peux pas savoir si elle est exporter ou pas. Je dois aller tout en bas du fichier pour le savoir

Si tu cherches sur le net, la recommandation actuelle est d'éviter les export default si c'est possible.

Exemple =>
Using default exports can make it harder to find things in your code and lead to inconsistencies. Instead, named exports make it easier to discover which members are being exported and what their corresponding names are, especially when using an IDE.

It's recommended to avoid using default exports and instead opt for named exports whenever possible. By doing so, you'll have a more organized and maintainable codebase that's easier to work with in the long run.

C'est pas le but de la PR, donc ne change pas. Mais sur les futurs devs, je pense qu'on doit de mettre à utiliser export const myFunction partout. Je suis bien entendu dispo pour en parler 😃

@jrivals jrivals merged commit 140aa39 into main Dec 18, 2024
5 checks passed
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.

2 participants