Reverted change to doCreateBooking() to fix #20

This commit is contained in:
0xFEEDC0DE64
2017-12-28 11:24:50 +01:00
parent 6c1a362396
commit 38d97be88d

View File

@@ -94,9 +94,9 @@ std::unique_ptr<GetBookingsReply> ZeiterfassungApi::doGetBookings(int userId, co
std::unique_ptr<CreateBookingReply> ZeiterfassungApi::doCreateBooking(int userId, const QDate &date, const QTime &time, const QTime &timespan,
const QString &type, const QString &text)
{
QNetworkRequest request(QUrl(m_url % "json/terminalPageController/evoTerminalBooking"));
QNetworkRequest request(QUrl(m_url % "json/booking"));
request.setHeader(QNetworkRequest::ContentTypeHeader, QByteArrayLiteral("application/json"));
request.setRawHeader(QByteArrayLiteral("sisAppName"), QByteArrayLiteral("terminal"));
request.setRawHeader(QByteArrayLiteral("sisAppName"), QByteArrayLiteral("bookingCalendar"));
QJsonObject obj;
obj[QStringLiteral("persNr")] = userId;
@@ -107,7 +107,6 @@ std::unique_ptr<CreateBookingReply> ZeiterfassungApi::doCreateBooking(int userId
obj[QStringLiteral("hourCategory")] = QStringLiteral("");
obj[QStringLiteral("empfEinh")] = QStringLiteral("");
obj[QStringLiteral("bewEinh")] = QStringLiteral("");
obj[QStringLiteral("einstuf")] = QStringLiteral("");
obj[QStringLiteral("text")] = text;
auto data = QJsonDocument(obj).toJson();