App directory #3
This commit is contained in:
parent
8bbeaa25cf
commit
69706053c6
25 changed files with 69 additions and 40 deletions
|
|
@ -3,7 +3,7 @@ import { getServerSession } from "next-auth";
|
|||
import { authOptions } from "@/app/_lib/auth";
|
||||
import { updateUserVisualization } from "@/app/_lib/opensearch";
|
||||
|
||||
const handler = async (req: NextRequest) => {
|
||||
export const POST = async (req: NextRequest) => {
|
||||
const session = await getServerSession(authOptions);
|
||||
const { user: { email } }: any = session;
|
||||
const { id, title, description, query } = await req.json();
|
||||
|
|
@ -18,5 +18,4 @@ const handler = async (req: NextRequest) => {
|
|||
return NextResponse.json({ id });
|
||||
};
|
||||
|
||||
export default handler;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue