mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 15:58:38 +01:00
new selfhosted version
This commit is contained in:
19
dashboard/server/utils/useTRPC.ts
Normal file
19
dashboard/server/utils/useTRPC.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import type { tRpcPaymentsType, tRpcEmailsType } from "~/server/plugins/trpc";
|
||||
|
||||
|
||||
export function useTRPC() {
|
||||
|
||||
const nitroApp = useNitroApp() as any;
|
||||
const payments = nitroApp.shared.tRpcPayments;
|
||||
const emails = nitroApp.shared.tRpcEmails;
|
||||
|
||||
|
||||
return {
|
||||
payments,
|
||||
emails
|
||||
} as {
|
||||
payments: tRpcPaymentsType,
|
||||
emails: tRpcEmailsType
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user