mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 15:58:38 +01:00
new selfhosted version
This commit is contained in:
13
dashboard/server/api/payments/check_info.ts
Normal file
13
dashboard/server/api/payments/check_info.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
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 }
|
||||
});
|
||||
Reference in New Issue
Block a user