mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 01:35:17 +01:00
12 lines
209 B
JavaScript
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();
|
|
};
|