14 lines
365 B
TypeScript
14 lines
365 B
TypeScript
"use client"
|
|
|
|
import { useMutation } from "@tanstack/react-query"
|
|
import { apiClient } from "../client"
|
|
|
|
export function useListUnsubscribeMailto() {
|
|
return useMutation({
|
|
mutationFn: (messageId: string) =>
|
|
apiClient.post<{ sent: boolean; mailto: string; subject?: string }>(
|
|
`/mail/messages/${messageId}/list-unsubscribe-mailto`
|
|
),
|
|
})
|
|
}
|