mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Auth and session middleware.
This commit is contained in:
parent
590a70c2ff
commit
d81ee3932d
14 changed files with 142 additions and 73 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { getWebsite, getSession, createSession } from 'lib/db';
|
||||
import { getCountry, getDevice, getIpAddress } from 'lib/utils';
|
||||
import { getCountry, getDevice, getIpAddress } from 'lib/request';
|
||||
import { uuid, isValidId, verifyToken } from 'lib/crypto';
|
||||
|
||||
export default async req => {
|
||||
|
|
@ -46,6 +46,8 @@ export default async req => {
|
|||
session_id,
|
||||
session_uuid,
|
||||
};
|
||||
} else {
|
||||
throw new Error(`Invalid website: ${website_uuid}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue