mocksaml/pages/api/saml/auth.ts

10 lines
295 B
TypeScript
Raw Normal View History

2022-02-22 05:36:06 +00:00
import type { NextApiRequest, NextApiResponse } from "next";
export async function handler(req: NextApiRequest, res: NextApiResponse) {
if (req.method === "POST") {
res.status(200).json({ name: "John Doe" });
} else {
res.status(405).send(`Method ${req.method} Not Allowed`);
}
}