Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Lost and Found Queries #11

Open
DikshantK2004 opened this issue Aug 6, 2024 · 0 comments
Open

Refactor Lost and Found Queries #11

DikshantK2004 opened this issue Aug 6, 2024 · 0 comments
Labels
good first issue Good for newcomers python

Comments

@DikshantK2004
Copy link
Collaborator

DikshantK2004 commented Aug 6, 2024

The current implementation of queries related to lost and found items is split into two separate files: lost.py and found.py. Both files contain similar queries but operate on different tables. To streamline the code and reduce redundancy, we need to merge these files into a single file, lost_found.py. Additionally, we will introduce a new parameter type to distinguish between lost and found queries.

Tasks

  1. Create a new file: /backend/backend/queries/lost_found.py.
  2. Merge all functions from lost.py and found.py into lost_found.py.
  3. Add a new parameter type to each function. The type parameter should be:
    • 0 for queries on the lost table.
    • 1 for queries on the found table.
  4. Refactor the logic within each function to use the type parameter to determine which table to query.

Note: Pull requests (PRs) on branches other than backend will be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers python
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant