mirror of
https://github.com/docmost/docmost.git
synced 2026-05-16 22:41:30 +08:00
29 lines
659 B
TypeScript
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;
|
|
}
|