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