diff --git a/packages/insomnia/src/ui/components/panes/request-pane.tsx b/packages/insomnia/src/ui/components/panes/request-pane.tsx index 437501c77..17c15a45d 100644 --- a/packages/insomnia/src/ui/components/panes/request-pane.tsx +++ b/packages/insomnia/src/ui/components/panes/request-pane.tsx @@ -113,7 +113,6 @@ export const RequestPane: FC = ({ const gitVersion = useGitVCSVersion(); const activeRequestSyncVersion = useActiveRequestSyncVCSVersion(); const activeEnvironment = useSelector(selectActiveEnvironment); - // const activeResponse = useSelector(selectActiveResponse); const activeRequestMeta = useSelector(selectActiveRequestMeta); // Force re-render when we switch requests, the environment gets modified, or the (Git|Sync)VCS version changes const uniqueKey = `${activeEnvironment?.modified}::${request?._id}::${gitVersion}::${activeRequestSyncVersion}::${activeRequestMeta?.activeResponseId}`; diff --git a/packages/insomnia/src/ui/components/wrapper.tsx b/packages/insomnia/src/ui/components/wrapper.tsx index fc7fda60f..c5c059dab 100644 --- a/packages/insomnia/src/ui/components/wrapper.tsx +++ b/packages/insomnia/src/ui/components/wrapper.tsx @@ -13,9 +13,9 @@ import { ACTIVITY_UNIT_TEST, AUTOBIND_CFG, } from '../../common/constants'; +import { database } from '../../common/database'; import { importRaw } from '../../common/import'; import { initializeSpectral, isLintError } from '../../common/spectral'; -import * as requestOperations from '../../models/helpers/request-operations'; import * as models from '../../models/index'; import { isRequest, @@ -147,16 +147,19 @@ export class WrapperClass extends PureComponent { if (r && r._type === 'request' && activeRequest && isRequest(activeRequest)) { // Only pull fields that we want to update - return requestOperations.update(activeRequest, { + return database.update({ + ...activeRequest, + modified: Date.now(), url: r.url, method: r.method, headers: r.headers, - // @ts-expect-error -- TSCONVERSION body: r.body, authentication: r.authentication, - // @ts-expect-error -- TSCONVERSION parameters: r.parameters, - }); + }, + // Pass true to indicate that this is an import + true + ); } } catch (error) { // Import failed, that's alright