Files
eamco_office_api/app/main/views.py
2024-03-28 10:36:00 -04:00

20 lines
467 B
Python
Executable File

from flask import jsonify, Response
from app import app
@app.route('/robots.txt')
@app.route('/sitemap.xml')
def static_from_root():
def disallow(string): return 'Disallow: {0}'.format(string)
return Response("User-agent: *\n{0}\n".format("\n".join([
disallow('/bin/*'),
disallow('/admin'),
])))
@app.route('/index', methods=['GET'])
@app.route('/', methods=['GET'])
def index():
return jsonify({"success": "Api is online"}), 200