perf(api): improve inserting events

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-09-12 22:09:35 +02:00
parent 46fe17e558
commit efd24ca67a
4 changed files with 133 additions and 19 deletions

View File

@@ -4,7 +4,7 @@ import superjson from 'superjson';
export function toDots(
obj: Record<string, unknown>,
path = ''
): Record<string, number | string | boolean> {
): Record<string, string> {
return Object.entries(obj).reduce((acc, [key, value]) => {
if (typeof value === 'object' && value !== null) {
return {