Skip to content

Commit fa5af18

Browse files
iOvergaardCopilot
andauthored
Update 16/umbraco-cms/customizing/foundation/fetching-data/custom-generated-client.md
Co-authored-by: Copilot <[email protected]>
1 parent e60bde1 commit fa5af18

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

16/umbraco-cms/customizing/foundation/fetching-data/custom-generated-client.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,14 @@ import { client } from './my-client/client.gen';
4848

4949
export const onInit = (host) => {
5050
host.consumeContext(UMB_AUTH_CONTEXT, (authContext) => {
51-
// Get the token info from Umbraco
52-
const config = authContext?.getOpenApiConfiguration();
53-
54-
client.setConfig({
55-
auth: config?.token ?? undefined,
56-
baseUrl: config?.base ?? "",
57-
credentials: config?.credentials ?? "same-origin",
51+
// Get the token info from Umbraco
52+
const config = authContext?.getOpenApiConfiguration();
53+
54+
client.setConfig({
55+
auth: config?.token ?? undefined,
56+
baseUrl: config?.base ?? "",
57+
credentials: config?.credentials ?? "same-origin",
58+
});
5859
});
5960
};
6061
```

0 commit comments

Comments
 (0)