From 18e769b5e51fb2ff020c5b95094a9b489b57cf02 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 13 Sep 2022 10:14:15 +0200 Subject: [PATCH] fix: plausible analytics actions --- apps/api/src/routes/api/v1/services/handlers.ts | 4 ++-- apps/ui/src/routes/__layout.svelte | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/apps/api/src/routes/api/v1/services/handlers.ts b/apps/api/src/routes/api/v1/services/handlers.ts index 48e58ca78..2207841d2 100644 --- a/apps/api/src/routes/api/v1/services/handlers.ts +++ b/apps/api/src/routes/api/v1/services/handlers.ts @@ -456,7 +456,7 @@ export async function activatePlausibleUsers(request: FastifyRequest, re if (destinationDockerId) { await executeDockerCmd({ dockerId: destinationDocker.id, - command: `docker exec ${id} 'psql -H postgresql://${postgresqlUser}:${postgresqlPassword}@localhost:5432/${postgresqlDatabase} -c "UPDATE users SET email_verified = true;"'` + command: `docker exec ${id}-postgresql psql -H postgresql://${postgresqlUser}:${postgresqlPassword}@localhost:5432/${postgresqlDatabase} -c "UPDATE users SET email_verified = true;"` }) return await reply.code(201).send() } @@ -476,7 +476,7 @@ export async function cleanupPlausibleLogs(request: FastifyRequest, repl if (destinationDockerId) { await executeDockerCmd({ dockerId: destinationDocker.id, - command: `docker exec ${id}-clickhouse sh -c "/usr/bin/clickhouse-client -q \\"SELECT name FROM system.tables WHERE name LIKE '%log%';\\"| xargs -I{} /usr/bin/clickhouse-client -q \"TRUNCATE TABLE system.{};\""` + command: `docker exec ${id}-clickhouse /usr/bin/clickhouse-client -q \\"SELECT name FROM system.tables WHERE name LIKE '%log%';\\"| xargs -I{} /usr/bin/clickhouse-client -q \"TRUNCATE TABLE system.{};\"` }) return await reply.code(201).send() } diff --git a/apps/ui/src/routes/__layout.svelte b/apps/ui/src/routes/__layout.svelte index 8694dfe45..071c9f75d 100644 --- a/apps/ui/src/routes/__layout.svelte +++ b/apps/ui/src/routes/__layout.svelte @@ -219,6 +219,8 @@ + IAM + + Settings
+ Logout +
@@ -287,8 +294,3 @@
- -IAM -Settings -Logout