Skip to content

Commit 11153ef

Browse files
Fixes use of sequentialize
1 parent 6eeced1 commit 11153ef

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/plus/gk/utils/-webview/integrationAuthentication.utils.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ import { sequentialize } from '../../../../system/function';
66
import type { IntegrationAuthenticationSessionDescriptor } from '../../../integrations/authentication/integrationAuthentication';
77
import type { ProviderAuthenticationSession } from '../../../integrations/authentication/models';
88

9-
export async function getBuiltInIntegrationSession(
10-
container: Container,
11-
id: IntegrationId,
12-
descriptor: IntegrationAuthenticationSessionDescriptor,
13-
options?:
14-
| { createIfNeeded: true; silent?: never; forceNewSession?: never }
15-
| { createIfNeeded?: never; silent: true; forceNewSession?: never }
16-
| { createIfNeeded?: never; silent?: never; forceNewSession: true },
17-
): Promise<ProviderAuthenticationSession | undefined> {
18-
return sequentialize(() =>
9+
export const getBuiltInIntegrationSession = sequentialize(
10+
(
11+
container: Container,
12+
id: IntegrationId,
13+
descriptor: IntegrationAuthenticationSessionDescriptor,
14+
options?:
15+
| { createIfNeeded: true; silent?: never; forceNewSession?: never }
16+
| { createIfNeeded?: never; silent: true; forceNewSession?: never }
17+
| { createIfNeeded?: never; silent?: never; forceNewSession: true },
18+
): Promise<ProviderAuthenticationSession | undefined> =>
1919
wrapForForcedInsecureSSL(
2020
container.integrations.ignoreSSLErrors({ id: id, domain: descriptor.domain }),
2121
async () => {
@@ -32,5 +32,4 @@ export async function getBuiltInIntegrationSession(
3232
};
3333
},
3434
),
35-
)();
36-
}
35+
);

0 commit comments

Comments
 (0)