#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: dagarcos """ import os from flask import render_template, Blueprint, url_for, redirect, request, jsonify from flask_cors import CORS, cross_origin from services.testService import TestService mainController = Blueprint('mainController', __name__) CORS(mainController, origins = '*', allow_headers=['Content-Type', 'content-type', 'Authorization', 'Access-Control-Allow-Credentials', 'Access-Control-Allow-Headers'], supports_credentials=True) tserv = TestService() @mainController.route('/test', methods=['GET']) def getDatos(): return jsonify(tserv.get_all()) @mainController.route('/status', methods=['GET']) def getStatus(): return "OK"