Skip to content

Commit

Permalink
Merge pull request #9678 from microsoft/southworks/fix/enable-referen…
Browse files Browse the repository at this point in the history
…ces-dropdown

fix: [#9666] Onclick Insert property reference in a memory drop down not appearing in Bot Framework Composer 2.1.3.
  • Loading branch information
tracyboehrer authored Jan 16, 2024
2 parents 1a93f21 + 2fa312f commit 707cfdd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,12 @@ export const checkIfBotExistsInBotProjectFile = async (
};

export const getMemoryVariables = async (projectId: string, options?: { signal: AbortSignal }) => {
const res = await fetch(`${BASEURL}/projects/${projectId}/variables`, { signal: options?.signal });
// eslint-disable-next-line no-underscore-dangle
const fetchHeaders = { 'X-CSRF-Token': window.__csrf__ };
const res = await fetch(`${BASEURL}/projects/${projectId}/variables`, {
headers: fetchHeaders,
signal: options?.signal,
});
const json = (await res.json()) as { variables: string[] };
return json.variables ?? [];
};
2 changes: 1 addition & 1 deletion Composer/packages/lib/shared/src/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Axios, { AxiosInstance, AxiosRequestConfig } from 'axios';
export * from 'axios';

const csrfInterceptor = (config: AxiosRequestConfig) => {
if (config.baseURL?.startsWith('/api') || config.url?.startsWith('/api')) {
if (config?.baseURL?.startsWith('/api') || config?.url?.startsWith('/api')) {
// eslint-disable-next-line no-underscore-dangle
config.headers['X-CSRF-Token'] = ((window as unknown) as { __csrf__: string }).__csrf__;
}
Expand Down
4 changes: 2 additions & 2 deletions extensions/azurePublish/yarn-berry.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1911,7 +1911,7 @@ __metadata:

"@bfc/shared@file:../../Composer/packages/lib/shared::locator=azurePublish%40workspace%3A.":
version: 0.0.0
resolution: "@bfc/shared@file:../../Composer/packages/lib/shared#../../Composer/packages/lib/shared::hash=823a6f&locator=azurePublish%40workspace%3A."
resolution: "@bfc/shared@file:../../Composer/packages/lib/shared#../../Composer/packages/lib/shared::hash=4ac2ba&locator=azurePublish%40workspace%3A."
dependencies:
"@botframework-composer/types": "*"
format-message: 6.2.4
Expand All @@ -1925,7 +1925,7 @@ __metadata:
react: 16.13.1
react-dom: 16.13.1
tslib: 2.4.0
checksum: 0151f655c015639587f6687101f0bc056a07611770ee08d2dc60dc8b61f81e7d6d21e86b4439135ec4270368eff57518c9a4e1bce48eba4099e9a998f35b9500
checksum: 167ca35df96fc7031c96dae9c3bba35fdcbb49ef03761b69c7cd61cbab963b9dd3e1e1080d96f636459af4efa676bfe8e1df1f6427f9044169a753e9b44c6f5b
languageName: node
linkType: hard

Expand Down
4 changes: 2 additions & 2 deletions extensions/azurePublishNew/yarn-berry.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1951,7 +1951,7 @@ __metadata:

"@bfc/shared@file:../../Composer/packages/lib/shared::locator=azure-publish-new%40workspace%3A.":
version: 0.0.0
resolution: "@bfc/shared@file:../../Composer/packages/lib/shared#../../Composer/packages/lib/shared::hash=823a6f&locator=azure-publish-new%40workspace%3A."
resolution: "@bfc/shared@file:../../Composer/packages/lib/shared#../../Composer/packages/lib/shared::hash=4ac2ba&locator=azure-publish-new%40workspace%3A."
dependencies:
"@botframework-composer/types": "*"
format-message: 6.2.4
Expand All @@ -1965,7 +1965,7 @@ __metadata:
react: 16.13.1
react-dom: 16.13.1
tslib: 2.4.0
checksum: 0151f655c015639587f6687101f0bc056a07611770ee08d2dc60dc8b61f81e7d6d21e86b4439135ec4270368eff57518c9a4e1bce48eba4099e9a998f35b9500
checksum: 167ca35df96fc7031c96dae9c3bba35fdcbb49ef03761b69c7cd61cbab963b9dd3e1e1080d96f636459af4efa676bfe8e1df1f6427f9044169a753e9b44c6f5b
languageName: node
linkType: hard

Expand Down

0 comments on commit 707cfdd

Please sign in to comment.