mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 01:35:17 +01:00
13 lines
275 B
JavaScript
13 lines
275 B
JavaScript
import { getWebsites } from 'lib/db';
|
|
import { useAuth } from 'lib/middleware';
|
|
|
|
export default async (req, res) => {
|
|
await useAuth(req, res);
|
|
|
|
const { user_id } = req.auth;
|
|
|
|
const websites = await getWebsites(user_id);
|
|
|
|
return res.status(200).json({ websites });
|
|
};
|