Skip to content

Commit 2819b2d

Browse files
committed
chore(api): sort countries alphabetically by label
1 parent 1a12f77 commit 2819b2d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/reva-api/modules/referential/referential.resolvers.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,12 @@ const unsafeReferentialResolvers = {
143143
prismaClient.conventionCollective.findMany(),
144144
getFCCertification: (_: unknown, { rncp }: { rncp: string }) =>
145145
RNCPReferential.getInstance().findOneByRncp(rncp),
146-
getCountries: () => prismaClient.country.findMany(),
146+
getCountries: () =>
147+
prismaClient.country.findMany({
148+
orderBy: {
149+
label: "asc",
150+
},
151+
}),
147152
getEtablissement: (_: unknown, { siret }: { siret: string }) =>
148153
findEtablissementDiffusible({ siret }),
149154
getEtablissementAsAdmin: (_: unknown, { siret }: { siret: string }) =>

0 commit comments

Comments
 (0)