OxbridgeEconomics
commited on
Commit
·
dd4fff8
1
Parent(s):
8bb8b47
fix
Browse files- app/app.py +1 -1
- jobs.json → app/jobs.json +0 -0
- app/routes/{category_router.py → category.py} +3 -3
app/app.py
CHANGED
@@ -6,7 +6,7 @@ import logging
|
|
6 |
from flask import Flask
|
7 |
from flask_apscheduler import APScheduler
|
8 |
from asgiref.wsgi import WsgiToAsgi
|
9 |
-
from
|
10 |
|
11 |
@dataclass
|
12 |
class Config:
|
|
|
6 |
from flask import Flask
|
7 |
from flask_apscheduler import APScheduler
|
8 |
from asgiref.wsgi import WsgiToAsgi
|
9 |
+
from routes import category_bp, summary_bp
|
10 |
|
11 |
@dataclass
|
12 |
class Config:
|
jobs.json → app/jobs.json
RENAMED
File without changes
|
app/routes/{category_router.py → category.py}
RENAMED
@@ -5,13 +5,13 @@ This module contains API endpoints for managing and retrieving categories
|
|
5 |
from the MongoDB database.
|
6 |
|
7 |
Routes:
|
8 |
-
- GET /
|
9 |
"""
|
10 |
from flask import jsonify
|
11 |
from ..controllers.category import get_categories
|
12 |
from . import category_bp
|
13 |
|
14 |
-
@category_bp.route("/
|
15 |
def fetch_categories():
|
16 |
"""
|
17 |
Handles GET requests to retrieve all categories.
|
@@ -20,7 +20,7 @@ def fetch_categories():
|
|
20 |
list[dict]: JSON response containing categories and their associated sites.
|
21 |
|
22 |
Endpoint:
|
23 |
-
GET /
|
24 |
|
25 |
"""
|
26 |
category_data = get_categories()
|
|
|
5 |
from the MongoDB database.
|
6 |
|
7 |
Routes:
|
8 |
+
- GET /category: Fetch all categories.
|
9 |
"""
|
10 |
from flask import jsonify
|
11 |
from ..controllers.category import get_categories
|
12 |
from . import category_bp
|
13 |
|
14 |
+
@category_bp.route("/category", methods=["GET"])
|
15 |
def fetch_categories():
|
16 |
"""
|
17 |
Handles GET requests to retrieve all categories.
|
|
|
20 |
list[dict]: JSON response containing categories and their associated sites.
|
21 |
|
22 |
Endpoint:
|
23 |
+
GET /category
|
24 |
|
25 |
"""
|
26 |
category_data = get_categories()
|