servir a index.html a rotas

This commit is contained in:
Caio1w
2025-10-29 21:48:22 -03:00
parent aac7fa0317
commit afeaf36479

View File

@@ -1,4 +1,4 @@
from flask import Flask, request, jsonify
from flask import Flask, request, jsonify, send_file
from flask_cors import CORS
from pymongo import MongoClient
from datetime import datetime, timedelta
@@ -76,7 +76,37 @@ def init_default_categories(user_id):
})
if categories:
categories_collection.insert_many(categories)
@app.route('/')
def serve_html_home():
return send_file('../web/assets/index.html')
@app.route('/dashboard')
def serve_html_dashboard():
return send_file('../web/assets/index.html')
@app.route('/login')
def serve_html_login():
return send_file('../web/assets/index.html')
@app.route('/cadastro')
def serve_html_cadastro():
return send_file('../web/assets/index.html')
@app.route('/transacoes')
def serve_html_transacoes():
return send_file('../web/assets/index.html')
@app.route('/configuracoes')
def serve_html_configuracoes():
return send_file('../web/assets/index.html')
@app.route('/about')
def serve_html_about():
return send_file('../web/assets/index.html')
@app.route('/help')
def serve_html_help():
return send_file('../web/assets/index.html')
# ROTAS DE AUTENTICAÇÃO
@app.route('/api/auth/register', methods=['POST'])
def register():