magpie/API/requests/updateasset.cpp

20 lines
578 B
C++
Raw Permalink Normal View History

//SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
//SPDX-License-Identifier: GPL-3.0-or-later
#include "updateasset.h"
Request::UpdateAsset::UpdateAsset (
Models::Asset::ID id,
const QString& title,
const QString& icon,
const QColor& color,
Models::Currency::ID currency,
const QUrl& baseUrl
):
Post(createUrl(baseUrl, "/updateAsset"), {
{"id", std::to_string(id).c_str()}, {"title", title}, {"icon", icon}, {"currency", std::to_string(currency).c_str()}, {"color", std::to_string(color.rgba()).c_str()}
})
{
emptyResult = true;
}