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.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Fix error message on login.
Mike Caob905824d500c
diff --git a/README.md b/README.mdindex 18ec0a38e..b5f498234 100644--- a/README.md+++ b/README.md@@ -48,6 +48,8 @@ For Postgresql:psql -h hostname -U username -d databasename -f sql/schema.postgresql.sql```+This will also create a login account with username **admin** and password **umami**.+### Configure umamiCreate an `.env` file with the followingdiff --git a/components/forms/LoginForm.js b/components/forms/LoginForm.jsindex 00f45a373..78e0480ee 100644--- a/components/forms/LoginForm.js+++ b/components/forms/LoginForm.js@@ -32,10 +32,10 @@ export default function LoginForm() {const handleSubmit = async ({ username, password }) => {const response = await post('/api/auth/login', { username, password });- if (response?.token) {+ if (typeof response !== 'string') {await Router.push('/');} else {- setMessage('Incorrect username/password');+ setMessage(response.startsWith('401') ? 'Incorrect username/password' : response);}};diff --git a/package.json b/package.jsonindex aa0c620f2..4f494e65f 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "umami",- "version": "0.10.1",+ "version": "0.10.2","description": "A simple, fast, website analytics alternative to Google Analytics. ","author": "Mike Cao <[email protected]>","license": "MIT",