import apiClient from "@/lib/axiosClient";
import { API_ENDPOINTS } from "@/lib/apiEndpoints";

export const viewService = {
  addView: (contentType: number, contentId: string, episodeId?: string): Promise<void> => {
    const body: Record<string, string | number> = {
      content_type: contentType,
      content_id: contentId,
    };
    if (episodeId) body.episode_id = episodeId;
    return apiClient.post(API_ENDPOINTS.ADD_VIEW, body).then(() => {});
  },
};
