Fix things
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user