Skip to content

Commit 1e1c630

Browse files
committed
Make isSandbox param truely optional
1 parent 44c3d19 commit 1e1c630

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/ROUTES.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3871,11 +3871,12 @@ const ROUTES = {
38713871
},
38723872
},
38733873
POLICY_ACCOUNTING_CERTINIA_PREREQUISITES: {
3874-
route: 'workspaces/:policyID/accounting/certinia/prerequisites/:isSandbox?/:subPage?',
3875-
getRoute: (policyID: string, isSandbox?: boolean, subPage?: string) => {
3876-
const sandboxSegment = isSandbox === undefined ? '' : `/${isSandbox ? 'true' : 'false'}`;
3877-
const subPageSegment = subPage ? `/${subPage}` : '';
3878-
return `workspaces/${policyID}/accounting/certinia/prerequisites${sandboxSegment}${subPageSegment}` as const;
3874+
route: 'workspaces/:policyID/accounting/certinia/prerequisites/:subPage?/:isSandbox?',
3875+
getRoute: (policyID: string, subPage?: string, isSandbox?: boolean) => {
3876+
if (!policyID) {
3877+
Log.warn('Invalid policyID is used to build the POLICY_ACCOUNTING_CERTINIA_PREREQUISITES route');
3878+
}
3879+
return `workspaces/${policyID}/accounting/certinia/prerequisites${subPage ? `/${subPage}` : ''}${isSandbox !== undefined ? `/${isSandbox ? 'true' : 'false'}` : ''}` as const;
38793880
},
38803881
},
38813882
POLICY_ACCOUNTING_CERTINIA_EXISTING_CONNECTIONS: {

0 commit comments

Comments
 (0)