API lib cleanup, 404 hosts WIP

This commit is contained in:
Jamie Curnow
2025-09-21 17:16:46 +10:00
parent 058f49ceea
commit 54e036276a
76 changed files with 921 additions and 544 deletions

View File

@@ -1,11 +1,11 @@
import { useQuery } from "@tanstack/react-query";
import { getStreams, type Stream, type StreamExpansion } from "src/api/backend";
import { getStreams, type HostExpansion, type Stream } from "src/api/backend";
const fetchStreams = (expand?: StreamExpansion[]) => {
const fetchStreams = (expand?: HostExpansion[]) => {
return getStreams(expand);
};
const useStreams = (expand?: StreamExpansion[], options = {}) => {
const useStreams = (expand?: HostExpansion[], options = {}) => {
return useQuery<Stream[], Error>({
queryKey: ["streams", { expand }],
queryFn: () => fetchStreams(expand),