Converted admin, auth, me and realtime routes.

This commit is contained in:
Mike Cao committed 2025-01-28 22:29:03 -08:00
1 parent 6c9f1ad06b
commit 5205551ca8
25 files changed
+346 -7

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
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);
const { user } = req.auth;
return ok(res, user);
};