mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-28 09:03:53 +00:00
18 lines
499 B
TypeScript
18 lines
499 B
TypeScript
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
|
import type { NextApiRequest, NextApiResponse } from 'next';
|
|
import { jsonRes } from '@/service/response';
|
|
import { SystemInputEnum } from '@/constants/app';
|
|
|
|
export type Props = {
|
|
[SystemInputEnum.userChatInput]: string;
|
|
};
|
|
|
|
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
|
const { userChatInput } = req.body as Props;
|
|
jsonRes(res, {
|
|
data: {
|
|
userChatInput
|
|
}
|
|
});
|
|
}
|