![]() |
Banking_System_Server
1.0.0
Qt-based banking app for user/admin account management, transactions, secure server communication via PostgreSQL/Supabase.
|
The UserInitRequest class handles user initialization requests for User Widget and Admin Widget. More...
#include <UserInitRequest.h>
Public Member Functions | |
UserInitRequest () | |
Constructor for the UserInitRequest class. More... | |
QJsonObject | execute (const QJsonObject &jsonObj, QMutex &m) override |
Executes the user initialization request. More... | |
![]() | |
virtual | ~Request () |
Virtual destructor for the Request class. More... | |
Additional Inherited Members | |
![]() | |
bool | isDBConnectionValid (DB::DatabaseManager *dbManager) |
Checks if the database connection is valid. More... | |
QJsonObject | CreateDBConnectionError (QJsonObject &response, QJsonObject &dataObj) |
Creates a JSON response indicating a database connection error. More... | |
QJsonObject | CreateErrorResponse (QJsonObject &response, QJsonObject &dataObj, QString message) |
Creates a generic error JSON response. More... | |
The UserInitRequest class handles user initialization requests for User Widget and Admin Widget.
This class processes requests to initialize user information based on their credentials. It retrieves user details and account information if applicable, and prepares a response with the user's role and associated data.
|
inline |
Constructor for the UserInitRequest class.
Initializes the DatabaseManager instance for handling database operations.
|
inlineoverridevirtual |
Executes the user initialization request.
This method processes the JSON request to initialize user information by validating the user's credentials and retrieving their details from the database. If the user is a regular user, it also retrieves their account number and current balance.
jsonObj | The JSON object containing the request data. |
m | The mutex to lock during the execution. |
Implements Request.