From 9b99236fa9c143918e461fc91e962b6373d78486 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Wed, 23 Jul 2025 23:09:07 -0600 Subject: [PATCH] fix function name --- apps/server/src/api/v2/chats/services/chat-helpers.ts | 4 ++-- .../src/api/v2/chats/services/server-asset-conversion.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/server/src/api/v2/chats/services/chat-helpers.ts b/apps/server/src/api/v2/chats/services/chat-helpers.ts index 9f28d1e1b..b9fd30585 100644 --- a/apps/server/src/api/v2/chats/services/chat-helpers.ts +++ b/apps/server/src/api/v2/chats/services/chat-helpers.ts @@ -21,7 +21,7 @@ import { ChatError, ChatErrorCode } from '@buster/server-shared/chats'; import { PostProcessingMessageSchema } from '@buster/server-shared/message'; import { and, eq, gte, isNull } from 'drizzle-orm'; import type { z } from 'zod'; -import { convertChatToAssetChat } from './server-asset-conversion'; +import { convertChatAssetTypeToDatabaseAssetType } from './server-asset-conversion'; /** * Validates a nullable JSONB field against a Zod schema @@ -368,7 +368,7 @@ export async function handleAssetChat( const userId = user.id; try { // Generate asset messages - const assetType = convertChatToAssetChat(chatAssetType); + const assetType = convertChatAssetTypeToDatabaseAssetType(chatAssetType); const assetMessages = await generateAssetMessages({ assetId, assetType, diff --git a/apps/server/src/api/v2/chats/services/server-asset-conversion.ts b/apps/server/src/api/v2/chats/services/server-asset-conversion.ts index b75545304..0a2edfe4d 100644 --- a/apps/server/src/api/v2/chats/services/server-asset-conversion.ts +++ b/apps/server/src/api/v2/chats/services/server-asset-conversion.ts @@ -6,6 +6,8 @@ const chatAssetTypeToDatabaseAssetType: Record dashboard: 'dashboard_file', }; -export const convertChatToAssetChat = (assetType: ChatAssetType): DatabaseAssetType => { +export const convertChatAssetTypeToDatabaseAssetType = ( + assetType: ChatAssetType +): DatabaseAssetType => { return chatAssetTypeToDatabaseAssetType[assetType]; };