Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

fix auth, add pg extension (#1596)

Brian Caoebf439c5987a
diff --git a/components/forms/EventDataForm.js b/components/forms/EventDataForm.js
index db8e7fbb7..e236aa3d3 100644
--- a/components/forms/EventDataForm.js
+++ b/components/forms/EventDataForm.js
@@ -22,7 +22,7 @@ export const filterOptions = [
{ label: 'Count', value: 'count' },
{ label: 'Average', value: 'avg' },
{ label: 'Minimum', value: 'min' },
- { label: 'Maxmimum', value: 'max' },
+ { label: 'Maximum', value: 'max' },
{ label: 'Sum', value: 'sum' },
];
diff --git a/db/postgresql/migrations/04_add_uuid/migration.sql b/db/postgresql/migrations/04_add_uuid/migration.sql
index 21d4cf07f..749cef6b2 100644
--- a/db/postgresql/migrations/04_add_uuid/migration.sql
+++ b/db/postgresql/migrations/04_add_uuid/migration.sql
@@ -1,3 +1,5 @@
+-- CreateExtension
+CREATE EXTENSION IF NOT EXISTS pgcrypto;
-- AlterTable
ALTER TABLE "account" ADD COLUMN "account_uuid" UUID NULL;
diff --git a/lib/auth.js b/lib/auth.js
index 446d5169a..a16208455 100644
--- a/lib/auth.js
+++ b/lib/auth.js
@@ -49,7 +49,7 @@ export async function allowQuery(req) {
}
if (userId) {
- const website = await getWebsite({ id });
+ const website = await getWebsite({ websiteUuid: id });
return website && website.userId === userId;
}