first commit
This commit is contained in:
parent
b216a187bd
commit
f73c77f548
119 changed files with 4504 additions and 4829 deletions
15
backend/routes/services.py
Normal file
15
backend/routes/services.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from flask import Blueprint, jsonify, request, current_app
|
||||
from utils.data_loader import load_data
|
||||
from utils.json_crud import load_json, save_json, add_entry, delete_entry, update_entry
|
||||
from models.service_model import ServiceModel
|
||||
import os
|
||||
|
||||
DATA_DIR = os.path.join(os.path.dirname(__file__), '../data')
|
||||
SERVICES_FILE = os.path.join(DATA_DIR, 'services.json')
|
||||
|
||||
services_bp = Blueprint('services', __name__, url_prefix='/api/services')
|
||||
|
||||
@services_bp.route('/', methods=['GET'])
|
||||
def get_services():
|
||||
services = load_data('services.json')
|
||||
return jsonify(services)
|
||||
Loading…
Add table
Add a link
Reference in a new issue