mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
11 lines
298 B
TypeScript
11 lines
298 B
TypeScript
import { NextApiRequestAuth } from 'lib/types';
|
|
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);
|
|
};
|