15 lines
No EOL
569 B
Python
15 lines
No EOL
569 B
Python
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) |