Skip to content

[Cart] Migrate cart endpoints and enforce per-user authorization #6

@Josan88

Description

@Josan88

Summary

Move cart behavior into the Node.js + Express backend and make sure users can access only their own PostgreSQL cart data.

Tasks

  • Implement list, add, update, and delete cart item endpoints
  • Persist cart data through PostgreSQL-compatible queries
  • Preserve the cart data shape the current frontend expects where practical
  • Enforce per-user ownership checks on cart operations
  • Remove any path or query behavior that can leak all cart rows
  • Add API test coverage for allowed and blocked cart access

Done criteria

  • An authenticated user can view only their own cart
  • Add, quantity update, and delete actions work end to end
  • Cart data persists correctly in PostgreSQL
  • The previous cart path mismatch and global cart exposure risk are removed

Reference

Metadata

Metadata

Labels

area/cartCart data flow and authorizationenhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions