terminei
This commit is contained in:
19
app/app.py
19
app/app.py
@@ -1,4 +1,4 @@
|
|||||||
from flask import Flask, request, jsonify, send_file
|
from flask import Flask, request, jsonify, send_from_directory
|
||||||
from flask_cors import CORS
|
from flask_cors import CORS
|
||||||
from pymongo import MongoClient
|
from pymongo import MongoClient
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
@@ -12,6 +12,7 @@ import os
|
|||||||
from bson import ObjectId
|
from bson import ObjectId
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
WEB_DIR = '../web'
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
CORS(app)
|
CORS(app)
|
||||||
|
|
||||||
@@ -78,35 +79,35 @@ def init_default_categories(user_id):
|
|||||||
categories_collection.insert_many(categories)
|
categories_collection.insert_many(categories)
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def serve_html_home():
|
def serve_html_home():
|
||||||
return send_file('../web/assets/index.html')
|
return send_file('../web/index.html')
|
||||||
|
|
||||||
@app.route('/dashboard')
|
@app.route('/dashboard')
|
||||||
def serve_html_dashboard():
|
def serve_html_dashboard():
|
||||||
return send_file('../web/assets/index.html')
|
return send_file('../web/index.html')
|
||||||
|
|
||||||
@app.route('/login')
|
@app.route('/login')
|
||||||
def serve_html_login():
|
def serve_html_login():
|
||||||
return send_file('../web/assets/index.html')
|
return send_file('../web/index.html')
|
||||||
|
|
||||||
@app.route('/cadastro')
|
@app.route('/cadastro')
|
||||||
def serve_html_cadastro():
|
def serve_html_cadastro():
|
||||||
return send_file('../web/assets/index.html')
|
return send_file('../web/index.html')
|
||||||
|
|
||||||
@app.route('/transacoes')
|
@app.route('/transacoes')
|
||||||
def serve_html_transacoes():
|
def serve_html_transacoes():
|
||||||
return send_file('../web/assets/index.html')
|
return send_file('../web/index.html')
|
||||||
|
|
||||||
@app.route('/configuracoes')
|
@app.route('/configuracoes')
|
||||||
def serve_html_configuracoes():
|
def serve_html_configuracoes():
|
||||||
return send_file('../web/assets/index.html')
|
return send_file('../web/index.html')
|
||||||
|
|
||||||
@app.route('/about')
|
@app.route('/about')
|
||||||
def serve_html_about():
|
def serve_html_about():
|
||||||
return send_file('../web/assets/index.html')
|
return send_file('../web/index.html')
|
||||||
|
|
||||||
@app.route('/help')
|
@app.route('/help')
|
||||||
def serve_html_help():
|
def serve_html_help():
|
||||||
return send_file('../web/assets/index.html')
|
return send_file('../web/index.html')
|
||||||
# ROTAS DE AUTENTICAÇÃO
|
# ROTAS DE AUTENTICAÇÃO
|
||||||
@app.route('/api/auth/register', methods=['POST'])
|
@app.route('/api/auth/register', methods=['POST'])
|
||||||
def register():
|
def register():
|
||||||
|
|||||||
Reference in New Issue
Block a user