Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [#9666] Onclick Insert property reference in a memory drop down not appearing in Bot Framework Composer 2.1.3. #9678

Merged
merged 5 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading