Skip to content

Prashasti assignment - #54

Open
Prashasti-Shrivastava wants to merge 3 commits into
rohit-ups:mainfrom
Prashasti-Shrivastava:prashasti-assignment
Open

Prashasti assignment#54
Prashasti-Shrivastava wants to merge 3 commits into
rohit-ups:mainfrom
Prashasti-Shrivastava:prashasti-assignment

Conversation

@Prashasti-Shrivastava

Copy link
Copy Markdown

testing:

Screenshot 2026-07-26 at 4 09 48 AM Added direct unit tests for taskService and full integration tests using Supertest for all HTTP endpoints.

Bugs:

Identified critical API bugs spanning routing, validation, and data mutation. Resolved Bug 1 (combining status filtering with pagination) and Bug 2 (1-based page offset logic) with full tests.
Screenshot 2026-07-26 at 4 58 26 AM

New route

added logic and route for assigning tasks and added tests for it
Screenshot 2026-07-26 at 6 40 02 AM

To do next

Rate limiting to prevent endpoint abuse/DDoS, and RBAC to restrict task creation, assignment, and deletion to authorized user roles.

what surprised me

How PUT requests performed a shallow merge ({ ...task, ...fields }) rather than replacing the resource, allowing clients to accidentally overwrite system fields like id and createdAt.
How PATCH /tasks/:id/complete was written to silently force priority back to 'medium', showing how state-transition endpoints can quietly introduce unintended data resets.

before shipping to production

Which production-grade database (e.g., PostgreSQL, MongoDB) are we migrating to, and is a load balancer configured for auto-scaling?
Are strict CORS policies set up for allowed origins, and is rate limiting enabled to block API abuse/DDoS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant