import request from "../../http/request";

export const interactionBaseApi = "/interactions";
/**
 * 点赞/取消点赞/喜欢/不喜欢
 * @param params {target_type: string,target_id: number}
 * @returns
 */
export const interactionApi = (params) => {
  return request({
    url: `${interactionBaseApi}/like`,
    method: "POST",
    data: params,
  });
};

/**
 * 关注/不关注用户
 * @param params {followee_id: number}
 */

export const followApi = (params) => {
  return request({
    url: `${interactionBaseApi}/follow`,
    method: "POST",
    data: params,
  });
};

/**
 * 不关注用户
 */

export const unfollowApi = (params) => {
  return request({
    url: `${interactionBaseApi}/unfollow`,
    method: "POST",
    data: params,
  });
};
