mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-22 09:57:00 +01:00
Fix error message on login.
This commit is contained in:
parent
c5d7d5dea2
commit
b905824d50
@ -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 umami
|
||||
|
||||
Create an `.env` file with the following
|
||||
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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 <mike@mikecao.com>",
|
||||
"license": "MIT",
|
||||
|
Loading…
Reference in New Issue
Block a user