Converted admin, auth, me and realtime routes.
This commit is contained in:
1 parent
6c9f1ad06b
commit
5205551ca8
25 files changed
+346
-7
No files matched your search
@@ -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);
|
||||
};
|
||||
Reference in new issue
Block a user