mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Revert entity loading to use model.all() (Fixes #1582)
This commit is contained in:
parent
a4f56ffe7d
commit
8d9352aaec
@ -112,3 +112,7 @@ function _diffRequests(rOld: Request | null, rNew: Request): boolean {
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function all(): Promise<Array<RequestVersion>> {
|
||||||
|
return db.all(type);
|
||||||
|
}
|
||||||
|
@ -48,19 +48,19 @@ export const reducer = combineReducers({
|
|||||||
async function getAllDocs() {
|
async function getAllDocs() {
|
||||||
// Restore docs in parent->child->grandchild order
|
// Restore docs in parent->child->grandchild order
|
||||||
const allDocs = [
|
const allDocs = [
|
||||||
...(await db.all(models.settings.type)),
|
...(await models.settings.all()),
|
||||||
...(await db.all(models.workspace.type)),
|
...(await models.workspace.all()),
|
||||||
...(await db.all(models.workspaceMeta.type)),
|
...(await models.workspaceMeta.all()),
|
||||||
...(await db.all(models.environment.type)),
|
...(await models.environment.all()),
|
||||||
...(await db.all(models.cookieJar.type)),
|
...(await models.cookieJar.all()),
|
||||||
...(await db.all(models.requestGroup.type)),
|
...(await models.requestGroup.all()),
|
||||||
...(await db.all(models.requestGroupMeta.type)),
|
...(await models.requestGroupMeta.all()),
|
||||||
...(await db.all(models.request.type)),
|
...(await models.request.all()),
|
||||||
...(await db.all(models.requestMeta.type)),
|
...(await models.requestMeta.all()),
|
||||||
...(await db.all(models.requestVersion.type)),
|
...(await models.requestVersion.all()),
|
||||||
...(await db.all(models.response.type)),
|
...(await models.response.all()),
|
||||||
...(await db.all(models.oAuth2Token.type)),
|
...(await models.oAuth2Token.all()),
|
||||||
...(await db.all(models.clientCertificate.type)),
|
...(await models.clientCertificate.all()),
|
||||||
];
|
];
|
||||||
|
|
||||||
return allDocs;
|
return allDocs;
|
||||||
|
Loading…
Reference in New Issue
Block a user