From 5e23f3f86119c95888776ec29bc954fbee868fb3 Mon Sep 17 00:00:00 2001 From: shamsmosowi Date: Thu, 9 Jun 2022 16:52:58 +1000 Subject: [PATCH] fix auditChange missing rowy user --- src/sources/TableSourceFirestore/useAuditChange.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sources/TableSourceFirestore/useAuditChange.ts b/src/sources/TableSourceFirestore/useAuditChange.ts index 7004cb86..362af735 100644 --- a/src/sources/TableSourceFirestore/useAuditChange.ts +++ b/src/sources/TableSourceFirestore/useAuditChange.ts @@ -5,6 +5,7 @@ import { globalScope, rowyRunAtom, compatibleRowyRunVersionAtom, + currentUserAtom, } from "@src/atoms/globalScope"; import { tableScope, @@ -12,6 +13,7 @@ import { auditChangeAtom, } from "@src/atoms/tableScope"; import { runRoutes } from "@src/constants/runRoutes"; +import { rowyUser } from "@src/utils/table"; /** * Sets the value of auditChangeAtom @@ -19,6 +21,8 @@ import { runRoutes } from "@src/constants/runRoutes"; export default function useAuditChange() { const setAuditChange = useSetAtom(auditChangeAtom, tableScope); const [rowyRun] = useAtom(rowyRunAtom, globalScope); + const [currentUser] = useAtom(currentUserAtom, globalScope); + const [compatibleRowyRunVersion] = useAtom( compatibleRowyRunVersionAtom, globalScope @@ -47,6 +51,7 @@ export default function useAuditChange() { route: runRoutes.auditChange, body: { type, + rowyUser: rowyUser(currentUser!), ref: { rowPath: tableSettings.collection, rowId,