mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 09:45:04 +01:00
add types back to event / pageview. fix non-redis auth
This commit is contained in:
parent
82f0bc3d2b
commit
c9cacbb0e2
@ -36,7 +36,13 @@ export const useAuth = createMiddleware(async (req, res, next) => {
|
||||
const shareToken = await parseShareToken(req);
|
||||
|
||||
let user = null;
|
||||
const { userId, authKey } = payload || {};
|
||||
let userId = null;
|
||||
|
||||
const { authKey } = payload || {};
|
||||
|
||||
if (typeof payload === 'string') {
|
||||
userId = payload;
|
||||
}
|
||||
|
||||
if (validate(userId)) {
|
||||
user = await getUser({ id: userId });
|
||||
|
@ -53,7 +53,24 @@ async function relationalQuery(data: {
|
||||
});
|
||||
}
|
||||
|
||||
async function clickhouseQuery(data) {
|
||||
async function clickhouseQuery(data: {
|
||||
id: string;
|
||||
websiteId: string;
|
||||
url: string;
|
||||
referrer?: string;
|
||||
pageTitle?: string;
|
||||
eventName?: string;
|
||||
hostname?: string;
|
||||
browser?: string;
|
||||
os?: string;
|
||||
device?: string;
|
||||
screen?: string;
|
||||
language?: string;
|
||||
country?: string;
|
||||
subdivision1?: string;
|
||||
subdivision2?: string;
|
||||
city?: string;
|
||||
}) {
|
||||
const {
|
||||
websiteId,
|
||||
id: sessionId,
|
||||
|
@ -50,7 +50,23 @@ async function relationalQuery(data: {
|
||||
});
|
||||
}
|
||||
|
||||
async function clickhouseQuery(data) {
|
||||
async function clickhouseQuery(data: {
|
||||
id: string;
|
||||
websiteId: string;
|
||||
url: string;
|
||||
referrer?: string;
|
||||
pageTitle?: string;
|
||||
hostname?: string;
|
||||
browser?: string;
|
||||
os?: string;
|
||||
device?: string;
|
||||
screen?: string;
|
||||
language?: string;
|
||||
country?: string;
|
||||
subdivision1?: string;
|
||||
subdivision2?: string;
|
||||
city?: string;
|
||||
}) {
|
||||
const {
|
||||
websiteId,
|
||||
id: sessionId,
|
||||
|
Loading…
Reference in New Issue
Block a user