fix: time conf

This commit is contained in:
archer
2023-06-17 21:53:04 +08:00
parent 00c93a63cd
commit 2b93ae2d00
3 changed files with 3 additions and 5 deletions

View File

@@ -32,8 +32,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
chatId?: string;
};
if (!modelId || !prompt) {
throw new Error('缺少参数');
if (!modelId || !prompt || prompt.length !== 2) {
throw new Error('Chat 缺少参数');
}
await connectToDatabase();