13 lines
379 B
TypeScript
13 lines
379 B
TypeScript
import { apiFetch } from "#lib/api";
|
|
import { IArtistWithFavs } from "#entities/profiles";
|
|
import { IS_DEVELOPMENT } from "#env/derived-vars";
|
|
|
|
export async function fetchProfiles(): Promise<IArtistWithFavs[]> {
|
|
const path = IS_DEVELOPMENT ? "/creators" : "/creators.txt";
|
|
const result = await apiFetch<IArtistWithFavs[]>(path, {
|
|
method: "GET",
|
|
});
|
|
|
|
return result;
|
|
}
|