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

feat: add endpoint to get revisions by client #154

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MaGOs92
Copy link
Contributor

@MaGOs92 MaGOs92 commented Feb 20, 2025

fufeck
fufeck approved these changes Feb 27, 2025
Comment on lines +91 to +103
const query = this.revisionRepository
.createQueryBuilder('revisions')
.select('revisions.id', 'id')
.addSelect('revisions.code_commune', 'codeCommune')
.addSelect('revisions.published_at', 'publishedAt')
.addSelect('revisions.validation', 'validation')
.addSelect('revisions.status', 'status')
.addSelect('revisions.is_current', 'isCurrent')
.distinctOn(['code_commune'])
.orderBy('code_commune, published_at')
.where('revisions.client_id = :clientId', {
clientId: client.id,
});
Copy link
Contributor

@fufeck fufeck Feb 27, 2025

Choose a reason for hiding this comment

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

Il y a un problème, on ne doit pas renvoyer la première révisions des commune pour un client mais la dernière révision

@fufeck fufeck self-requested a review February 27, 2025 11:16
Comment on lines +173 to +175
const revisionsByClient = await this.revisionService.findFirstsByClient(
req.client,
);
Copy link
Contributor

@fufeck fufeck Feb 27, 2025

Choose a reason for hiding this comment

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

La route ne doit pas renvoyer les première revisions par commune pour un client mais les dernière révisions des communes d'un client je pense

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