fix: Email template improvements
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
||||
CascadeDeleteResult,
|
||||
EmailTemplate,
|
||||
UpdateEmailTemplateRequest,
|
||||
PreviewTemplateResponse,
|
||||
// User management types
|
||||
ManagedUser,
|
||||
ListUsersResponse,
|
||||
@@ -278,15 +279,15 @@ export const adminApi = {
|
||||
const response = await apiClient.put<EmailTemplate>(`/admin/email-templates/${key}`, data);
|
||||
return response.data;
|
||||
},
|
||||
preview: async (key: string, variables: Record<string, string>): Promise<{ subject: string; body: string }> => {
|
||||
const response = await apiClient.post<{ subject: string; body: string }>(
|
||||
preview: async (key: string, variables: Record<string, string>): Promise<PreviewTemplateResponse> => {
|
||||
const response = await apiClient.post<PreviewTemplateResponse>(
|
||||
`/admin/email-templates/${key}/preview`,
|
||||
{ variables }
|
||||
);
|
||||
return response.data;
|
||||
},
|
||||
sendTest: async (key: string): Promise<{ message?: string; error?: string; subject: string; body: string }> => {
|
||||
const response = await apiClient.post<{ message?: string; error?: string; subject: string; body: string }>(
|
||||
sendTest: async (key: string): Promise<{ message?: string; error?: string }> => {
|
||||
const response = await apiClient.post<{ message?: string; error?: string }>(
|
||||
`/admin/email-templates/${key}/test`
|
||||
);
|
||||
return response.data;
|
||||
|
||||
Reference in New Issue
Block a user