Skip to content

Commit 6b54dd3

Browse files
author
Tom Frenken
committed
changes
1 parent 8b5970e commit 6b54dd3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/connectivity/src/scp-cf/destination/service-binding-to-destination.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ describe('service binding to destination', () => {
236236
);
237237
});
238238

239-
it('transforms a generic service binding to a client credentials destination', async () => {
239+
it('transforms a generic service binding to a client credentials destination with custom url', async () => {
240240
const destination =
241241
await transformServiceBindingToClientCredentialsDestination(
242242
resolveServiceBinding('some-service'),

packages/connectivity/src/scp-cf/destination/service-binding-to-destination.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,19 @@ export async function transformServiceBindingToDestination(
5858

5959
/**
6060
* Transforms a service binding to a destination of type OAuth2ClientCredentials.
61-
* @param serviceBinding - The service binding to transform.
62-
* @param options - Options used for fetching the destination.
61+
* @param service - The service binding to transform.
62+
* @param options - Options used to transform the service binding.
6363
* @returns A promise returning the transformed destination on success.
6464
*/
6565
export async function transformServiceBindingToClientCredentialsDestination(
6666
service: Service,
67-
options?: ServiceBindingTransformOptions & { url: string }
67+
options?: ServiceBindingTransformOptions & { url?: string }
6868
): Promise<Destination> {
69-
const token = await serviceToken(serviceBinding, options);
69+
const token = await serviceToken(service, options);
7070
return buildClientCredentialsDestination(
7171
token,
72-
options?.url ?? serviceBinding.url,
73-
serviceBinding.name
72+
options?.url ?? service.url,
73+
service.name
7474
);
7575
}
7676

0 commit comments

Comments
 (0)