Fix things

This commit is contained in:
2026-01-02 16:17:49 +01:00
parent 3399b5925e
commit 0cc827e1ce
5 changed files with 68 additions and 26 deletions

View File

@@ -2,11 +2,17 @@ from board_mate.auth import *
from flask import jsonify, request
from pydantic import StrictStr
from src.models.AuthData import AuthData
class AuthController:
def __init__(self, app):
_auth_data : AuthData = None
def __init__(self, app, auth_data, host):
self._register_routes(app)
self.config = Configuration(host="https://192.168.15.120:8000")
self.config = Configuration(host=host)
self.auth_data = auth_data
self.config.verify_ssl = False
def _register_routes(self, app):
@@ -30,5 +36,5 @@ class AuthController:
return jsonify({"success" : response.success, "message" : response.message , "data" : response.data}), 200
except Exception as e:
print(f"Exception when calling AuthAPI->login: {e}")
return jsonify({"success" : response.success, "message" : response.message , "data" : response.data}), 500
return jsonify({"success" : False, "message" : e , "data" : null}), 500