From e2aeeb9aa946dc1c565d9c45d273c0ecbbb42305 Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Mon, 19 Oct 2020 18:23:22 +1030 Subject: [PATCH] fix: docker containers not updating info correctly --- app/graphql/schema/resolvers.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/graphql/schema/resolvers.ts b/app/graphql/schema/resolvers.ts index 10c572366..0da4eb2e1 100644 --- a/app/graphql/schema/resolvers.ts +++ b/app/graphql/schema/resolvers.ts @@ -38,8 +38,17 @@ dee.on('*', async (data: { Type: string }) => { return; } - const { json } = await modules.getApps(); - publish('info', 'UPDATED', json); + // @todo: Create a system user for this + const user = usersState.findOne({ name: 'root' }); + + if (user) { + const { json } = await modules.getAppCount({ + user + }); + publish('info', 'UPDATED', { + apps: json + }); + } }); dee.listen();