Adding optional QVariant data argument to sendGetRequest to pass it to the server. Using hard coded sendGetRequest(GetBiddingsOfSpecificRound, 2) in fetchCurrentBiddings action to test this.
This commit is contained in:
@ -113,7 +113,8 @@ void ServerCommunicator::setServerConfiguration(const QString url,
|
||||
m_password = password;
|
||||
}
|
||||
|
||||
void ServerCommunicator::onSendGetRequestTriggered(const GetRequestTypes type) {
|
||||
void ServerCommunicator::onSendGetRequestTriggered(const GetRequestTypes type,
|
||||
QVariant data = QVariant()) {
|
||||
QString path;
|
||||
switch (type) {
|
||||
case GetCurrentBiddingRound:
|
||||
@ -128,7 +129,9 @@ void ServerCommunicator::onSendGetRequestTriggered(const GetRequestTypes type) {
|
||||
case StopCurrentBiddingRound:
|
||||
path = ROUTE_STOP_BIDDINGROUND;
|
||||
break;
|
||||
// case GetBiddingsOfSpecificRound:
|
||||
case GetBiddingsOfSpecificRound:
|
||||
path = ROUTE_GET_BIDDINGS_OF_SPECIFIC_ROUND + "/" + data.toString();
|
||||
break;
|
||||
case GetBiddingsOfHighestRound:
|
||||
path = ROUTE_GET_BIDDINGS_OF_HIGHEST_ROUND;
|
||||
break;
|
||||
@ -172,6 +175,7 @@ void ServerCommunicator::onGetReplySuccessful(const GetRequestTypes type, const
|
||||
case StopCurrentBiddingRound:
|
||||
currentBiddingRoundChangedReply(doc);
|
||||
break;
|
||||
case GetBiddingsOfSpecificRound:
|
||||
case GetBiddingsOfHighestRound:
|
||||
currentBiddingsReply(doc);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user