File size: 471 Bytes
6a8626d 72f4cb5 77770e3 6e73939 8ec804c 6e73939 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
"""
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
|