Skip to content

Add transaction model, controller, and routes with validation for expense category#253

Open
ajinkya8010 wants to merge 1 commit intoTanmayKalra09:mainfrom
ajinkya8010:feat/transaction-backend
Open

Add transaction model, controller, and routes with validation for expense category#253
ajinkya8010 wants to merge 1 commit intoTanmayKalra09:mainfrom
ajinkya8010:feat/transaction-backend

Conversation

@ajinkya8010
Copy link
Contributor

🚀 Pull Request

📋 Description

This PR implements the backend logic for transactions, including the Mongoose model, controller functions, and Express routes. It enforces that the category field is required only for expense transactions, while allowing it to be optional for income transactions. The endpoints support creating, fetching, and deleting transactions for the authenticated user, with robust error handling and validation.

Fixes #226

🔍 Type of Change

  • Bug fix 🐞
  • New feature ✨
  • Documentation update 📝
  • Refactoring or code improvement ♻️
  • Other (please describe):

🙋 Your Details

🧪 How Has This Been Tested?

Locally on postman

📸 Screenshots (if applicable)

Before After

✅ Checklist

  • I have read the contributing guidelines.
  • I have followed the code style and linting rules.
  • I have added tests or explained why not.
  • I have updated documentation (if needed).
  • My changes do not introduce any known security issues or vulnerabilities.

@vercel
Copy link

vercel bot commented Aug 18, 2025

@ajinkya8010 is attempting to deploy a commit to the Tanmay Kalra's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

[FEATURE] Add backend logic (Model, Route and Controller) for Transaction

1 participant