mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-22 13:44:34 +03:00
7ba6969e65
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
28 lines
608 B
C++
28 lines
608 B
C++
#include "testhelper.h"
|
|
#include <QJsonObject>
|
|
#include <QJsonDocument>
|
|
|
|
OCC::FolderDefinition folderDefinition(const QString &path)
|
|
{
|
|
OCC::FolderDefinition d;
|
|
d.localPath = path;
|
|
d.targetPath = path;
|
|
d.alias = path;
|
|
return d;
|
|
}
|
|
|
|
|
|
const QByteArray jsonValueToOccReply(const QJsonValue &jsonValue)
|
|
{
|
|
QJsonObject root;
|
|
QJsonObject ocs;
|
|
QJsonObject meta;
|
|
|
|
meta.insert("statuscode", 200);
|
|
|
|
ocs.insert(QStringLiteral("data"), jsonValue);
|
|
ocs.insert(QStringLiteral("meta"), meta);
|
|
root.insert(QStringLiteral("ocs"), ocs);
|
|
|
|
return QJsonDocument(root).toJson();
|
|
}
|