Repository navigation
Add admin email notification preferences - #276
Merged
Merged
Conversation
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR276Version: 🤖 Updated on each push. |
- Add email_preferences column to users table (migration 0015) - Add getAdminEmailsForCategory() to filter admin recipients - Add GET/PUT /admin/email-preferences API endpoints - Add CLI commands: nemar admin email-preferences show/update - Wire auth and dataset routes to use filtered email lists - Fix TEST_API_URL env var leaking into manifest tests
- Add try/catch around email send in /publish/resend endpoint - Log corrupt email_preferences JSON instead of silently defaulting - Log safety fallback when all admins opted out of a category - Reuse parseEmailPreferences() and DEFAULT_EMAIL_PREFERENCES in admin routes - Derive EmailCategory from EmailPreferences with keyof - Distinguish missing user from missing preferences in GET handler
neuromechanist
force-pushed
the
worktree-admin-email-options
branch
from
March 10, 2026 01:51
f9543e2 to
5c8feba
Compare
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
user_approvalandpublication_requestemail_preferencesJSON column touserstablegetAdminEmailsForCategory()filters recipients; at least one admin always receives each categoryGET/PUT /admin/email-preferencesendpointsnemar admin email-preferences show/updatecommandsTEST_API_URLenv var no longer leaks into manifest testsTest plan
bun test)nemar admin email-preferences showreturns defaults (all true)nemar admin email-preferences update --no-user-approvaldisables user approval emails