Public Access
feat(broadcasts): add admin broadcast page and user opt-out switch
Admin page /admin/broadcasts to write, test and send broadcasts in both languages; confirms the recipient count before send. History shows the counts. A new switch in settings lets users opt out of platform mails; account mails always come. Subject and body are plain text only.
This commit is contained in:
1 parent
0154202ddc
commit
fa0857f55d
13 files changed
+642
-4
No files matched your search
@@ -58,3 +58,11 @@ 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}),
|
||||
});
|
||||
Reference in new issue
Block a user