From 257b957b3baa93ff044e0e0ff5524657cdee1322 Mon Sep 17 00:00:00 2001 From: Matteo Giaccone Date: Tue, 9 Jun 2020 16:57:05 +0200 Subject: [PATCH] Add Loader.loadSchemaWithinEnvironment To allow non-destructive calls of loadSchema --- src/local/Loader.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/local/Loader.js b/src/local/Loader.js index 4f9c81eb..168e2f17 100644 --- a/src/local/Loader.js +++ b/src/local/Loader.js @@ -18,6 +18,15 @@ export default class Loader { }); } + loadSchemaWithinEnvironment() { + return this.client + .get('/site', { include: 'item_types,item_types.fields' }) + .then(site => { + this.siteId = site.data.id; + this.entitiesRepo.upsertEntities(site); + }); + } + load() { return Promise.all([ this.client.get('/site', { include: 'item_types,item_types.fields' }),