umami/pages/api/auth/verify.ts
2022-11-15 13:21:14 -08:00

11 lines
310 B
TypeScript

import { NextApiRequestAuth } from 'interface/api/nextApi';
import { useAuth } from 'lib/middleware';
import { NextApiResponse } from 'next';
import { ok } from 'next-basics';
export default async (req: NextApiRequestAuth, res: NextApiResponse) => {
await useAuth(req, res);
return ok(res, req.auth);
};