feat: save api responses (#4382)

Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
This commit is contained in:
Nivedin
2024-09-30 19:06:53 +05:30
committed by GitHub
parent fdf5bf34ed
commit 58857be650
84 changed files with 3080 additions and 321 deletions

View File

@@ -2,6 +2,7 @@ import {
HoppCollection,
HoppGQLRequest,
HoppRESTRequest,
RESTReqSchemaVersion,
} from "@hoppscotch/data"
import { getAffectedIndexes } from "./affectedIndex"
import { RESTTabService } from "~/services/tab/rest"
@@ -67,7 +68,7 @@ export function getRequestsByPath(
if (pathArray.length === 1) {
const latestVersionedRequests = currentCollection.requests.filter(
(req): req is HoppRESTRequest => req.v === "3"
(req): req is HoppRESTRequest => req.v === RESTReqSchemaVersion
)
return latestVersionedRequests
@@ -78,7 +79,7 @@ export function getRequestsByPath(
}
const latestVersionedRequests = currentCollection.requests.filter(
(req): req is HoppRESTRequest => req.v === "3"
(req): req is HoppRESTRequest => req.v === RESTReqSchemaVersion
)
return latestVersionedRequests