magpie/API/requests/login.h

24 lines
525 B
C++

// SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include "post.h"
namespace Request {
class Login : public Post {
Q_OBJECT
public:
Login (const QString& login, const QString& password, const QUrl& baseUrl);
protected:
void onSuccess (const QVariantMap& data) override;
void onError (const QString& error, const std::optional<QVariantMap>& data) override;
static const std::map<QString, QMetaType::Type> tokensStructure;
};
}