import { Routes } from "../routes/Routes";
import { createApiHeaders } from "./util";
import { AdminUserDTO } from "../dto/AdminUserDTO";

export async function getOtherUsers(
  authToken: string
): Promise<AdminUserDTO[]> {
  const response = await fetch(Routes.Admin.getOtherUsers, {
    method: "GET",
    headers: createApiHeaders(authToken),
  });

  let data = (await response.json()) as AdminUserDTO[];
  return data;
}
