mirror of https://github.com/buster-so/buster.git
fix function name
This commit is contained in:
parent
e2eefbda68
commit
9b99236fa9
|
@ -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,
|
||||
|
|
|
@ -6,6 +6,8 @@ const chatAssetTypeToDatabaseAssetType: Record<ChatAssetType, DatabaseAssetType>
|
|||
dashboard: 'dashboard_file',
|
||||
};
|
||||
|
||||
export const convertChatToAssetChat = (assetType: ChatAssetType): DatabaseAssetType => {
|
||||
export const convertChatAssetTypeToDatabaseAssetType = (
|
||||
assetType: ChatAssetType
|
||||
): DatabaseAssetType => {
|
||||
return chatAssetTypeToDatabaseAssetType[assetType];
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue