Fix some bugs
This commit is contained in:
@@ -19,7 +19,6 @@ class AuthController:
|
||||
auth_api = AuthApi(client)
|
||||
|
||||
auth_request = AuthRequestDto(
|
||||
username=StrictStr(received_data["username"]),
|
||||
username=StrictStr(received_data["username"]),
|
||||
key=StrictStr(received_data["key"]),
|
||||
)
|
||||
@@ -28,8 +27,8 @@ class AuthController:
|
||||
print("Success:", response.success)
|
||||
print("Message:", response.message)
|
||||
print("Data:", response.data)
|
||||
return jsonify(response), 200
|
||||
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(response), 500
|
||||
return jsonify({"success" : response.success, "message" : response.message , "data" : response.data}), 500
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@ class ClientController:
|
||||
print("Success:", response.success)
|
||||
print("Message:", response.message)
|
||||
print("Data:", response.data)
|
||||
return jsonify(response), 200
|
||||
return jsonify({"success" : response.success, "message" : response.message , "data" : response.data}), 200
|
||||
|
||||
except ApiException as e:
|
||||
print(f"Exception when calling ClientApi->create: {e}")
|
||||
return jsonify(response), 500
|
||||
return jsonify({"success" : response.success, "message" : response.message , "data" : response.data}), 500
|
||||
|
||||
|
||||
Reference in New Issue
Block a user