feat: implement user management with roles and last login tracking

This commit is contained in:
2024-09-02 10:32:26 +02:00
parent 58254c4973
commit 069b318f0b
4 changed files with 52 additions and 1 deletions

View File

@ -2,6 +2,7 @@ from flask import Flask, request, jsonify
from flask_sqlalchemy import SQLAlchemy
from database import init_db
from models import db, Game
from user_management import user_bp
import os
from datetime import datetime
@ -42,6 +43,8 @@ def get_games():
'owned': game.owned
} for game in games])
app.register_blueprint(user_bp) # Register the user management blueprint
if __name__ == '__main__':
with app.app_context():
init_db() # Ensure the database is initialized when the app starts