fix(common): move ua parser to common and import isServer flag

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-10-05 23:44:18 +02:00
parent 153faab878
commit 301d86aa71
8 changed files with 29 additions and 131 deletions

View File

@@ -1,8 +1,8 @@
import { getClientIp, parseIp } from '@/utils/parseIp';
import { parseUserAgent } from '@/utils/parseUserAgent';
import type { FastifyReply, FastifyRequest } from 'fastify';
import { assocPath, pathOr } from 'ramda';
import { parseUserAgent } from '@openpanel/common/server';
import { getProfileById, upsertProfile } from '@openpanel/db';
import type {
IncrementProfilePayload,

View File

@@ -1,10 +1,9 @@
import type { GeoLocation } from '@/utils/parseIp';
import { getClientIp, parseIp } from '@/utils/parseIp';
import { parseUserAgent } from '@/utils/parseUserAgent';
import type { FastifyReply, FastifyRequest } from 'fastify';
import { path, assocPath, pathOr, pick } from 'ramda';
import { generateDeviceId } from '@openpanel/common/server';
import { generateDeviceId, parseUserAgent } from '@openpanel/common/server';
import {
createProfileAlias,
getProfileById,