Files
docmost/apps/client/src/features/page/services/watcher-service.ts
T
Philip Okugbe 879aa2c3d8 feat: page update notifications (#2074)
* feat: watchers notification and email preferences

* fix: email copy

* digests

* clean up

* fix

* clean up

* move backlinks queue-up to history processor

* fix

* fix keys

* feat: group notifications

* filter

* adjust email digest window
2026-03-31 16:03:59 +01:00

17 lines
607 B
TypeScript

import api from "@/lib/api-client";
export async function watchPage(pageId: string): Promise<{ watching: boolean }> {
const req = await api.post<{ watching: boolean }>("/pages/watch", { pageId });
return req.data;
}
export async function unwatchPage(pageId: string): Promise<{ watching: boolean }> {
const req = await api.post<{ watching: boolean }>("/pages/unwatch", { pageId });
return req.data;
}
export async function getWatchStatus(pageId: string): Promise<{ watching: boolean }> {
const req = await api.post<{ watching: boolean }>("/pages/watch-status", { pageId });
return req.data;
}