mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-17 21:25:54 +02:00
15 lines
453 B
JavaScript
15 lines
453 B
JavaScript
import { PostHog } from 'posthog-node';
|
|
const ph_project_api_key = process.env.PH_PROJECT_API_KEY;
|
|
const client = ph_project_api_key ? new PostHog(ph_project_api_key) : '';
|
|
export default async function encryptedpdf(request) {
|
|
const email = request.params.email;
|
|
if (client) {
|
|
client?.capture({
|
|
distinctId: email,
|
|
event: 'encrypted_pdf_error',
|
|
properties: { response_code: 200 },
|
|
});
|
|
}
|
|
return { message: 'success' };
|
|
}
|