umami/pages/api/auth/verify.ts

11 lines
298 B
TypeScript
Raw Normal View History

2022-12-07 03:36:41 +01:00
import { NextApiRequestAuth } from 'lib/types';
2022-11-15 22:21:14 +01:00
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);
};