Muhammad Abdur Rahman Saad
fix pylint errors
72f4cb5
raw
history blame
471 Bytes
"""
Category Controller - Business logic for handling category data.
This module contains functions that interact with the database
to fetch and process data sorted by category
"""
from models.database import category_collection # pylint: disable=import-error
def get_categories():
"""
Returns all categories and their corresponding sites
"""
categories = list(category_collection.find({}, {"_id": 0, "category": 1, "site": 1}))
return categories