fix: space overview favorites (#2110)

This commit is contained in:
Philip Okugbe
2026-04-14 02:58:24 +01:00
committed by GitHub
parent 66c70c0e76
commit cc00e77dfb
11 changed files with 103 additions and 39 deletions
@@ -21,13 +21,14 @@ export async function removeFavorite(
await api.post("/favorites/remove", params);
}
export async function getFavoriteIds(type: FavoriteType): Promise<IPagination<string>> {
const req = await api.post<IPagination<string>>("/favorites/ids", { type });
export async function getFavoriteIds(type: FavoriteType, spaceId?: string): Promise<IPagination<string>> {
const req = await api.post<IPagination<string>>("/favorites/ids", { type, spaceId });
return req.data;
}
export async function getFavorites(params?: {
type?: FavoriteType;
spaceId?: string;
limit?: number;
cursor?: string;
}): Promise<IPagination<IFavorite>> {