Added types for session data.

This commit is contained in:
Mike Cao committed 2024-04-18 14:23:14 -07:00
1 parent 32cfb74c49
commit 4ca4be4445
5 files changed
+25 -22

No files matched your search

+1 -1
View File
@@ -132,7 +132,7 @@ export async function getClientInfo(req: NextApiRequestCollect) {
const subdivision2 = location?.subdivision2;
const city = location?.city;
const browser = browserName(userAgent);
const os = detectOS(userAgent);
const os = detectOS(userAgent) as string;
const device = getDevice(req.body?.payload?.screen, os);
return { userAgent, browser, os, ip, country, subdivision1, subdivision2, city, device };