Simplified the way response objects are written with the 200 - OK response

This commit is contained in:
Kenneth Skovhede
2014-07-02 15:03:56 +02:00
parent 2bad7b01cb
commit 65ee7d7846
9 changed files with 51 additions and 50 deletions
@@ -35,7 +35,7 @@ namespace Duplicati.Server.WebServer
res = DumpTable(x, "ErrorLog", "Timestamp", input["offset"].Value, input["pagesize"].Value);
});
bw.WriteJsonObject(res);
bw.OutputOK(res);
}
else
{
@@ -62,12 +62,12 @@ namespace Duplicati.Server.WebServer
try { n["Data"] = System.Text.Encoding.UTF8.GetString((byte[])n["Data"]); }
catch { }
bw.WriteJsonObject(dt);
bw.OutputOK(dt);
}
else
{
var dt = DumpTable(cmd, "LogData", "ID", input["offset"].Value, input["pagesize"].Value);
bw.WriteJsonObject(dt);
bw.OutputOK(dt);
}
}
}