Commit 3fcee5f1 authored by Grant's avatar Grant
Browse files

add announce to api client

parent bc9e49d4
Loading
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -13,6 +13,19 @@ export const API = {
        }),
    },
  },
  mod: {
    announce: (title: string, body?: string) =>
      fetch("/api/mod/user/@all/notice", {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          body: JSON.stringify({
            title,
            body,
          }),
        },
      }),
  },
  macro: {
    syncEventFromFEAPI: (event_id: string) =>
      fetch("https://api.fediverse.events/v1/events/" + event_id)