Skip to content

Commit 769d082

Browse files
committed
fix(web): clean up useHttpRequestWorkspace public API
1 parent b3b83e8 commit 769d082

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

packages/web/src/hooks/useHttpRequestWorkspace.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
} from '../components/request-workspace';
88
import type { WorkspaceRequest } from '../sdk';
99
import type { WorkspaceStore } from '../stores/workspace';
10-
import { getFileType } from '../utils/fileType';
1110

1211
interface UseHttpRequestWorkspaceInput {
1312
path: Accessor<string>;
@@ -39,7 +38,6 @@ interface HttpRequestWorkspaceState {
3938
// Actions/operations
4039
actions: {
4140
reset: () => void;
42-
validateAndAdjustIndex: () => void;
4341
};
4442
}
4543

@@ -50,9 +48,6 @@ export function useHttpRequestWorkspace(
5048

5149
const requests = createMemo<WorkspaceRequest[]>(() => {
5250
const path = input.path();
53-
if (getFileType(path) !== 'http') {
54-
return [];
55-
}
5651
return input.workspace.requestsByPath()[path] ?? [];
5752
});
5853

@@ -154,8 +149,7 @@ export function useHttpRequestWorkspace(
154149
body: bodyDraft
155150
},
156151
actions: {
157-
reset,
158-
validateAndAdjustIndex
152+
reset
159153
}
160154
};
161155
}

0 commit comments

Comments
 (0)