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

Ajoute une fonction pour récupérer les tags catégories #3445

Merged
merged 5 commits into from
Dec 2, 2024

Conversation

amandinejacquelin
Copy link
Contributor

Appel trpc :

const input: Input = {
      collectiviteId: 1,
      withPredefinedTags : true
};
const result = await caller.tags.categories.getCategoriesByCollectivite(input);

Copy link

Copy link
Contributor

@farnoux farnoux left a comment

Choose a reason for hiding this comment

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

👍

) {}

router = this.trpc.router({
getCategoriesByCollectivite: this.trpc.authedProcedure
Copy link
Contributor

Choose a reason for hiding this comment

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

Vu que tu es déjà dans un router dédié au get des catégories, j'aurais tendance à simplifier le naming avec un simple list par exemple. Pour avoir une lisibilité de l'appel un poil plus concis trpc.tags.categories.list.
(en omettant le byCollectivite qui est tellement systématique pour la majorité de nos appels qu'il devient juste bruyant de l'expliciter IMO).

Détails de naming, tu me diras ce que tu en penses.

imports: [
ConfigurationModule,
CommonModule,
TrpcModule,
Copy link
Contributor

Choose a reason for hiding this comment

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

Micro détail / partage : tu peux te passer de l'import de TrpcModule que j'ai identifié en tant que @Global(), et donc accessible par toues les autres modules sans besoin d'importer.

@amandinejacquelin amandinejacquelin force-pushed the TET-3373/get-groupement-collectivite branch from 9778d86 to 3873ca3 Compare December 2, 2024 09:26
@amandinejacquelin amandinejacquelin merged commit ca164fa into main Dec 2, 2024
16 checks passed
@amandinejacquelin amandinejacquelin deleted the TET-3373/get-groupement-collectivite branch December 2, 2024 10:05
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