import { ctdoapikey } from '@ctdo/sdk';
const client = new ctdoapikey({
apiKey: process.env.CTDO_SECRET
});
export default async function handler(req, res) {
const result = await client.verify({
key: req.headers['x-api-key'],
scope: 'read:analytics'
});
if (!result.valid) {
return res.status(401).json({ error: 'Unauthorized' });
}
}