Clicking the sendInvite button triggers a post request to the server to send a bidding invite via mail.
This commit is contained in:
@ -58,6 +58,11 @@ void ServerCommunicator::setServerConfiguration(const QString url,
|
||||
m_password = password;
|
||||
}
|
||||
|
||||
QString ServerCommunicator::getUserLoginUrl() const {
|
||||
const QString logInUrl = m_serviceApi->baseUrl().toString() + ROUTE_LOG_IN;
|
||||
return logInUrl;
|
||||
}
|
||||
|
||||
void ServerCommunicator::onSendGetRequestTriggered(const GetRequestTypes type,
|
||||
QVariant data = QVariant()) {
|
||||
QString path;
|
||||
@ -143,6 +148,9 @@ void ServerCommunicator::onSendPostRequestTriggered(const PostRequestTypes type,
|
||||
case RegisterUser:
|
||||
path = ROUTE_REGISTER_USER;
|
||||
break;
|
||||
case MailInvite:
|
||||
path = ROUTE_MAIL_INVITE;
|
||||
break;
|
||||
default:
|
||||
qWarning() << "No route found for PostRequestType:" << type;
|
||||
break;
|
||||
@ -184,6 +192,10 @@ void ServerCommunicator::onPostReplySuccessful(const PostRequestTypes type,
|
||||
qInfo() << "Register user successful:" << type;
|
||||
onlineUserAccountReply(doc);
|
||||
break;
|
||||
case MailInvite:
|
||||
qInfo() << "Mail invite successful sent:" << type;
|
||||
mailInviteSentReply(doc);
|
||||
break;
|
||||
default:
|
||||
qWarning() << "Can't match request type:" << type;
|
||||
break;
|
||||
@ -228,3 +240,8 @@ void ServerCommunicator::onlineUserAccountReply(const QJsonDocument jsonDoc) {
|
||||
emit onlineUserAccountReceived(values[MailRole].toString(), values[OnlineIdRole].toString(),
|
||||
values[AccessCodeRole].toString());
|
||||
}
|
||||
|
||||
void ServerCommunicator::mailInviteSentReply(const QJsonDocument jsonDoc) {
|
||||
qInfo() << "Invitation mail successfully sent.";
|
||||
emit m_core->displayStatusMessage("Invitation mail successfully sent.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user