fix: temporarily remove botid from demo (#1438)

This commit is contained in:
dancer 2026-03-02 15:14:01 +00:00 committed by GitHub
parent 314f8ced57
commit 5c941dd830
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 3 additions and 51 deletions

View file

@ -7,7 +7,6 @@ import {
stepCountIs,
streamText,
} from "ai";
import { checkBotId } from "botid/server";
import { after } from "next/server";
import { createResumableStreamContext } from "resumable-stream";
import { auth, type UserType } from "@/app/(auth)/auth";
@ -64,14 +63,7 @@ export async function POST(request: Request) {
const { id, message, messages, selectedChatModel, selectedVisibilityType } =
requestBody;
const [botResult, session] = await Promise.all([
checkBotId().catch(() => null),
auth(),
]);
if (botResult?.isBot) {
return new ChatbotError("unauthorized:chat").toResponse();
}
const session = await auth();
if (!session?.user) {
return new ChatbotError("unauthorized:chat").toResponse();