feat(routes-b): validate hex color and enforce 100 tag limit per user…#653
Open
Peolite001 wants to merge 2 commits into
Open
feat(routes-b): validate hex color and enforce 100 tag limit per user…#653Peolite001 wants to merge 2 commits into
Peolite001 wants to merge 2 commits into
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
|
@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. |
|
@Peolite001 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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 #536
Description
This PR implements the requirements for #536 - Validate hex color and enforce max tags per user on the
routes-btags POST endpoint.Changes Made
*All changes are strictly within
app/api/routes-b/as per scope:app/api/routes-b/_lib/limits.ts(new)TAG_LIMITSconstant withMAX_TAGS_PER_USER: 100app/api/routes-b/tags/schema.tscreateTagSchemawith:#RRGGBB)app/api/routes-b/tags/route.ts$transaction409 Conflictwhen limit is reachedapp/api/routes-b/tags/tests/create.test.ts(new)Key Features
app/api/routes-b/_lib/app/api/routes-b/tags/tests/Out of Scope (as specified)
app/api/routes-b/Testing