import { apiFetch } from "#lib/api";
import { IAnnouncement } from "#entities/posts";

export async function fetchAnnouncements(service: string, profileID: string) {
  const path = `/${service}/user/${profileID}/announcements`;
  const result = await apiFetch<IAnnouncement[]>(path, { method: "GET" });

  return result;
}
