Skip to content

Refactor Lost and Found Queries #11

Description

@DikshantK2004

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions