validateRequest method
Implementation
Future<void> validateRequest(String? testPassword, String? database) async {
testMode = false;
if (testPassword != null) {
if (testPassword == C_TEST_PASSWORD) {
testMode = true;
} else {
throw RemoteStatusException(RemoteStatus.INVALID_TEST_MODE);
}
}
if (!testMode) {
database = null;
}
AbstractPool dbPool = poolStore.getMySqlPool(database);
userTools = poolStore.getUserTools(database);
transaction = DbTransaction(dbPool);
try {
await transaction.beginTransaction();
transactionBegun=true;
} catch (e) {
print("WS $e");
}
}