Revert entity loading to use model.all() (Fixes #1582)

This commit is contained in:
Gregory Schier 2019-07-02 15:42:00 -04:00
parent a4f56ffe7d
commit 8d9352aaec
2 changed files with 17 additions and 13 deletions

View File

@ -112,3 +112,7 @@ function _diffRequests(rOld: Request | null, rNew: Request): boolean {
return false;
}
export function all(): Promise<Array<RequestVersion>> {
return db.all(type);
}

View File

@ -48,19 +48,19 @@ export const reducer = combineReducers({
async function getAllDocs() {
// Restore docs in parent->child->grandchild order
const allDocs = [
...(await db.all(models.settings.type)),
...(await db.all(models.workspace.type)),
...(await db.all(models.workspaceMeta.type)),
...(await db.all(models.environment.type)),
...(await db.all(models.cookieJar.type)),
...(await db.all(models.requestGroup.type)),
...(await db.all(models.requestGroupMeta.type)),
...(await db.all(models.request.type)),
...(await db.all(models.requestMeta.type)),
...(await db.all(models.requestVersion.type)),
...(await db.all(models.response.type)),
...(await db.all(models.oAuth2Token.type)),
...(await db.all(models.clientCertificate.type)),
...(await models.settings.all()),
...(await models.workspace.all()),
...(await models.workspaceMeta.all()),
...(await models.environment.all()),
...(await models.cookieJar.all()),
...(await models.requestGroup.all()),
...(await models.requestGroupMeta.all()),
...(await models.request.all()),
...(await models.requestMeta.all()),
...(await models.requestVersion.all()),
...(await models.response.all()),
...(await models.oAuth2Token.all()),
...(await models.clientCertificate.all()),
];
return allDocs;