From 751fa29be91e4284995015332c8565a9355191d1 Mon Sep 17 00:00:00 2001 From: shamsmosowi Date: Tue, 4 Oct 2022 12:25:53 +0200 Subject: [PATCH 1/2] history snapshot make collectionId customizable --- src/components/TableModals/ExtensionsModal/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/TableModals/ExtensionsModal/utils.ts b/src/components/TableModals/ExtensionsModal/utils.ts index e85bd207..117ef381 100644 --- a/src/components/TableModals/ExtensionsModal/utils.ts +++ b/src/components/TableModals/ExtensionsModal/utils.ts @@ -95,6 +95,7 @@ const extensionBodyTemplate = { return ({ trackedFields: [], // a list of string of column names + collectionId: "historySnapshots", // optionally change the sub-collection id of where the history snapshots are stored }) }`, algoliaIndex: `const extensionBody: AlgoliaIndexBody = async({row, db, change, ref}) => { From 433ee68c2c3aba0f588c5f0ee1673e95469f74fd Mon Sep 17 00:00:00 2001 From: shamsmosowi Date: Tue, 4 Oct 2022 12:26:43 +0200 Subject: [PATCH 2/2] prevent failed version request from crashing table view --- src/atoms/projectScope/rowyRun.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/atoms/projectScope/rowyRun.ts b/src/atoms/projectScope/rowyRun.ts index 1699be63..bc6d35cd 100644 --- a/src/atoms/projectScope/rowyRun.ts +++ b/src/atoms/projectScope/rowyRun.ts @@ -117,8 +117,13 @@ export const rowyRunAtom = atom((get) => { /** Store deployed Rowy Run version */ export const rowyRunVersionAtom = atom(async (get) => { const rowyRun = get(rowyRunAtom); - const response = await rowyRun({ route: runRoutes.version }); - return response.version as string | false; + try { + const response = await rowyRun({ route: runRoutes.version }); + return response.version as string | false; + } catch (e) { + console.log(e); + return false; + } }); /**