628 add revert to defaults branding#657
Open
Peolite001 wants to merge 4 commits into
Open
Conversation
…- Add strict #RRGGBB hex color validation - Enforce max 100 tags per user with atomic transaction (409 on exceed) - Trim + lowercase tag names + length validation (max 32 chars) - Add TAG_LIMITS constant in _lib/limits.ts - Add comprehensive tests for success and failure cases Closes davedumto#536
- Enrich tags list response with usageCount (invoices + contacts) - Use single optimized Prisma query with _count (no N+1) - Add 30-second in-memory caching with proper invalidation on POST - Update POST response to include usageCount: 0 for new tags - All changes kept inside app/api/routes-b/ as per scope Closes davedumto#611
- New GET /notifications/digest?date=YYYY-MM-DD - Respects user timezone for day boundaries - Single Prisma groupBy query (no N+1) - Rejects future dates - Added helper in _lib/notifications.ts Closes davedumto#623
- Added atomic revert using upsert in transaction - Captures previous branding values for audit logging - Created shared helper in _lib/branding.ts - Audit log entry created with oldValues Closes davedumto#628
|
@Peolite001 is attempting to deploy a commit to the david's projects Team on Vercel. A member of the Team first needs to authorize it. |
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.
Closes #628
Description
This PR implements #628 - Add revert-to-defaults action on the routes-b branding endpoint.
Changes Made
All changes are strictly inside
app/api/routes-b/:app/api/routes-b/_lib/branding.ts(new)DEFAULT_BRANDINGrevertBrandingToDefaults()helper that performs atomic revert using Prisma transactionapp/api/routes-b/branding/revert/route.ts(new)POST /branding/revertendpointAudit log entry created with
oldValuesso the previous state can be restored manually if needed.Key Features
upsert)Acceptance Criteria Met
Out of Scope