mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
13 lines
700 B
TypeScript
13 lines
700 B
TypeScript
import { PremiumModel } from "~/shared/schema/PremiumSchema";
|
|
|
|
|
|
export default defineEventHandler(async event => {
|
|
const ctx = await getRequestContext(event, 'flag:allowAnonRegistered');
|
|
throw createError({ status: 400, message: 'NOT IMPLEMENTED' });
|
|
// const { user_id } = ctx;
|
|
// const tRpc = useTRPC();
|
|
// const premiumData = await PremiumModel.findOne({ user_id });
|
|
// if (!premiumData) throw createError({ status: 400, message: 'Premium data not found. Please contact support.' });
|
|
// const paymentMethods = await tRpc.payments.customer.listMethods.query({ customer_id: premiumData.customer_id });
|
|
// return { paymentMethodsCount: paymentMethods.data.length }
|
|
}); |