Files
docmost/apps/client/src/features/space/services/space-watcher-service.ts
T
2026-04-09 00:37:51 +01:00

29 lines
659 B
TypeScript

import api from "@/lib/api-client";
export async function watchSpace(
spaceId: string,
): Promise<{ watching: boolean }> {
const req = await api.post<{ watching: boolean }>("/spaces/watch", {
spaceId,
});
return req.data;
}
export async function unwatchSpace(
spaceId: string,
): Promise<{ watching: boolean }> {
const req = await api.post<{ watching: boolean }>("/spaces/unwatch", {
spaceId,
});
return req.data;
}
export async function getSpaceWatchStatus(
spaceId: string,
): Promise<{ watching: boolean }> {
const req = await api.post<{ watching: boolean }>("/spaces/watch-status", {
spaceId,
});
return req.data;
}