umami/pages/api/auth/verify.js
2020-08-04 22:45:05 -07:00

12 lines
209 B
JavaScript

import { useAuth } from 'lib/middleware';
export default async (req, res) => {
await useAuth(req, res);
if (req.auth) {
return res.status(200).json(req.auth);
}
return res.status(401).end();
};