mirror of
https://github.com/httpjamesm/AnonymousOverflow-hub.git
synced 2024-12-06 19:16:18 +01:00
14 lines
393 B
TypeScript
14 lines
393 B
TypeScript
import type { InstanceList } from "./interfaces/instance";
|
|
|
|
export const fetchInstances = async () => {
|
|
const instanceManifestUrl =
|
|
process.env.NEXT_PUBLIC_INSTANCE_MANIFEST_URL ||
|
|
"https://raw.githubusercontent.com/httpjamesm/AnonymousOverflow/main/instances.json";
|
|
|
|
const res = await fetch(instanceManifestUrl);
|
|
|
|
const data: InstanceList = await res.json();
|
|
|
|
return data;
|
|
};
|