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