Added types for session data.

This commit is contained in:
Mike Cao 2024-04-18 14:23:14 -07:00
parent 32cfb74c49
commit 4ca4be4445
5 changed files with 25 additions and 22 deletions

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 };