mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 15:58:38 +01:00
16 lines
411 B
TypeScript
16 lines
411 B
TypeScript
|
|
import StripeService from '~/server/services/StripeService';
|
|
|
|
export default defineEventHandler(async event => {
|
|
|
|
const data = await getRequestData(event, { requireSchema: false, allowLitlyx: false });
|
|
if (!data) return;
|
|
|
|
const { project } = data;
|
|
|
|
const customer = await StripeService.getCustomer(project.customer_id);
|
|
if (customer?.deleted) return;
|
|
|
|
return customer?.address;
|
|
|
|
}); |