From 2d9b0723bb2963b73b01ba8009a8a54caaa6d725 Mon Sep 17 00:00:00 2001 From: Roberto Lucas Date: Mon, 20 May 2024 23:46:59 -0600 Subject: [PATCH] fix: typo --- apps/masterbots.ai/app/og/route.tsx | 8 ++++---- apps/masterbots.ai/lib/threads.ts | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/masterbots.ai/app/og/route.tsx b/apps/masterbots.ai/app/og/route.tsx index 17c1d641..f974ae29 100644 --- a/apps/masterbots.ai/app/og/route.tsx +++ b/apps/masterbots.ai/app/og/route.tsx @@ -1,15 +1,15 @@ -import { ImageResponse } from '@vercel/og' -import { NextRequest } from 'next/server' -import '@/app/globals.css' import { getThread } from '@/app/actions' +import '@/app/globals.css' import OgImage from '@/components/og-image' +import { ImageResponse } from '@vercel/og' +import { NextRequest } from 'next/server' export const runtime = 'edge' export async function GET(req: NextRequest) { try { const { searchParams } = req.nextUrl const threadId = searchParams.get('threadId'); - const thread = await getThread({ threadId },) + const thread = await getThread({ threadId }) const question = thread.firstMessage.content const answer = thread.firstAnswer.content const username = thread.account?.username diff --git a/apps/masterbots.ai/lib/threads.ts b/apps/masterbots.ai/lib/threads.ts index 56e93b6d..f4ee1149 100644 --- a/apps/masterbots.ai/lib/threads.ts +++ b/apps/masterbots.ai/lib/threads.ts @@ -1,7 +1,7 @@ -import type * as AI from 'ai' +import { extractBetweenMarkers } from '@/lib/utils' import { MB } from '@repo/supabase' +import type * as AI from 'ai' import { toSlug } from './url-params' -import { extractBetweenMarkers } from '@/lib/utils' export function createMessagePairs(messages: AI.Message[]): MB.MessagePair[] { const messagePairs: MB.MessagePair[] = [] @@ -49,7 +49,7 @@ export interface MessagePair { export function convertMessage(message: MB.Message) { return { - id: message.messageId, + id: message.id, content: message.content, createAt: message.createdAt, role: message.role