fix: resolve CLI serialization failures and add README
Two Akka.NET deserialization bugs prevented CLI commands from reaching ManagementActor: IReadOnlyList<string> in AuthenticatedUser serialized as a compiler-generated internal type unknown to the server, and ManagementSuccess.Data carried server-side assembly types the CLI couldn't resolve on receipt. Fixed by using string[] for roles and pre-serializing response data to JSON in ManagementActor before sending. Adds full CLI reference documentation covering all 10 command groups.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Security.Cryptography;
|
||||
using Akka.Actor;
|
||||
using Newtonsoft.Json;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ScadaLink.Commons.Entities.ExternalSystems;
|
||||
@@ -56,7 +57,8 @@ public class ManagementActor : ReceiveActor
|
||||
try
|
||||
{
|
||||
var result = await DispatchCommand(scope.ServiceProvider, envelope.Command, user.Username);
|
||||
sender.Tell(new ManagementSuccess(correlationId, result));
|
||||
var json = JsonConvert.SerializeObject(result, Formatting.None);
|
||||
sender.Tell(new ManagementSuccess(correlationId, json));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user