feat(settings): remove the platform mails switch

Broadcasts go to every active user, so the settings switch and its API
call are gone. Admin broadcast texts no longer mention an opt-out.
This commit is contained in:
lobo committed 2026-10-02 07:53:35 +02:00
1 parent 6dda186bdf
commit 80259cb0e9
8 files changed
+19 -60

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@ const JSON_HEADERS = {'Content-Type': 'application/json'};
export const fetchBroadcasts = () => apiFetch(`${AUTH()}/api/admin/broadcasts`);
/**
* {count}: the active users with platform mails on, among `userIds`; all of them when `userIds` is null.
* {count}: the active users among `userIds`; all of them when `userIds` is null.
*/
export const fetchRecipientCount = (userIds) =>
apiFetch(`${AUTH()}/api/admin/broadcasts/recipient-count${userIds ? `?userIds=${userIds.join(',')}` : ''}`);
-8
View File
@@ -58,11 +58,3 @@ export const markWelcomeSeen = () =>
method: 'PUT',
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
});
/** PUT on Auth, 204: turns the broadcast mails on or off. The caller handles the response status. */
export const savePlatformMails = (enabled) =>
apiFetch(`${import.meta.env.VITE_API_URL}/api/users/settings/platform-mails`, {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({enabled}),
});