|
|
@@ -1,7 +1,8 @@
|
|
|
import { hc } from 'hono/client'
|
|
|
import type {
|
|
|
AuthRoutes, UserRoutes, RoleRoutes,
|
|
|
- FileRoutes, MembershipPlanRoutes, PaymentRoutes
|
|
|
+ FileRoutes, MembershipPlanRoutes, PaymentRoutes,
|
|
|
+ TemplateRoutes, PublicTemplateRoutes
|
|
|
} from '@/server/api';
|
|
|
import { axiosFetch } from './utils/axios-fetch';
|
|
|
|
|
|
@@ -30,11 +31,11 @@ export const paymentClient = hc<PaymentRoutes>('/', {
|
|
|
}).api.v1.payments;
|
|
|
|
|
|
// 模板管理客户端(需要认证)
|
|
|
-export const templateClient = hc<any>('/', {
|
|
|
+export const templateClient = hc<TemplateRoutes>('/', {
|
|
|
fetch: axiosFetch,
|
|
|
}).api.v1.templates;
|
|
|
|
|
|
// 公共模板客户端(无需认证)
|
|
|
-export const publicTemplateClient = hc<any>('/', {
|
|
|
+export const publicTemplateClient = hc<PublicTemplateRoutes>('/', {
|
|
|
fetch: axiosFetch,
|
|
|
-}).templates;
|
|
|
+}).api.v1.public.templates;
|