Skip to content

Commit

Permalink
feat(api): replaced capitalized by camel case for formacode label
Browse files Browse the repository at this point in the history
  • Loading branch information
fbonniec committed Nov 15, 2024
1 parent 6388d8a commit a14a438
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ export const getDomainsByCertificationId = async ({
domains.push({
id: parent.id,
code: parent.code,
label: parent.label,
label: parent.label
.toLowerCase()
.replace(/^./, (str) => str.toUpperCase()),
children: [subDomain],
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export async function getFormacodes(): Promise<Formacode[]> {
const formacodes: Formacode[] = codes.map((formacode) => ({
id: formacode.id,
code: formacode.code,
label: formacode.parentCode
? formacode.label.toLowerCase().replace(/^./, (str) => str.toUpperCase())
: formacode.label,
label: formacode.label
.toLowerCase()
.replace(/^./, (str) => str.toUpperCase()),
type: formacode.type,
parentCode: formacode.parentCode || undefined,
}));
Expand Down

0 comments on commit a14a438

Please sign in to comment.