mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
Fixed session check logic. Closes #1340.
This commit is contained in:
parent
2181ca4ec8
commit
c0276db6e3
@ -49,17 +49,17 @@ export async function getSession(req) {
|
|||||||
country,
|
country,
|
||||||
device,
|
device,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!session) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (!e.message.includes('Unique constraint')) {
|
if (!e.message.toLowerCase().includes('unique constraint')) {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!session) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
const { session_id } = session;
|
const { session_id } = session;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user