Moved token conversion so doc won't fail

This commit is contained in:
Rick Falkvinge
2017-10-01 18:48:01 +02:00
parent 7f7d1e3e3a
commit 44021640b0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -332,7 +332,7 @@ namespace Swarmops.Frontend.Socket
{
JObject json = new JObject();
json["MessageType"] = "ProgressUpdate";
json["Guid"] = guid;
json["Guid"] = guid.Replace("-", "_"); // necessary to be a JS token
json["Progress"] = progress;
FrontendLoop.BroadcastToOrganization(organization, json);
+1 -1
View File
@@ -364,7 +364,7 @@ namespace Swarmops.Frontend.Automation
JObject data = new JObject();
data["ServerRequest"] = "ConvertPdf";
data["PdfFiles"] = JArray.FromObject(pdfsForConversion.ToArray());
data["Guid"] = (string) guid.Replace("-", "_"); // convert to token
data["Guid"] = (string) guid;
data["PersonId"] = authData.CurrentUser.Identity;
data["OrganizationId"] = authData.CurrentOrganization.Identity;
socket.Send(data.ToString());