first commit

This commit is contained in:
2024-02-28 16:08:07 -05:00
commit 7556d1a75c
32 changed files with 1309 additions and 0 deletions

7
app/main/__init__.py Normal file
View File

@@ -0,0 +1,7 @@
# coding=utf-8
from flask import Blueprint
main = Blueprint('main', __name__)
from . import views

31
app/main/views.py Normal file
View File

@@ -0,0 +1,31 @@
from flask import jsonify, Response
from app import app
from app import stripe_keys
@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
@app.route('/key')
def get_publishable_key():
"""
Gets the key for the frontend
"""
stripe_config = {'publicKey': stripe_keys['public_key']}
return jsonify(stripe_config)