diff --git a/Program.cs b/Program.cs index d6fb6e7..a069792 100644 --- a/Program.cs +++ b/Program.cs @@ -30,7 +30,7 @@ var apiKey = env["API_KEY"]; var valkApiKey = "some key"; -long minuteCountWaitTime = 5; +long minuteCountWaitTime = 60000; StateMachinesController? stateMachinesController = new StateMachinesController(minuteCountWaitTime); @@ -60,7 +60,7 @@ app.MapGet("/api/v1/sync", async (HttpContext ctx) => { - Debug.WriteLine("test 0"); + //Debug.WriteLine("test 0"); string instructionId = ctx.Request.Headers["id"]; string key = ctx.Request.Headers["apikey"]; @@ -135,6 +135,8 @@ return "No instruction ID provided"; } + Debug.WriteLine("check1"); + var ValkyireServerController = new ValkyrieServerController() { ValkyrieAPIKey = valkApiKey @@ -152,23 +154,28 @@ string id = Guid.NewGuid().ToString(); - stateMachinesController.AddMachine(id, response.content); + var machine = stateMachinesController.AddMachine(id, response.content); (bool complete, string result) status = (false, "Not completed - state machine took too long."); long tick = 0; - var totalTime = (60000 / 2) * minuteCountWaitTime; + var totalTime = (60000 / 20) * minuteCountWaitTime; while (!status.complete && tick < totalTime && !context.RequestAborted.IsCancellationRequested) { - Debug.WriteLine("status: " + status.complete + " " + tick); + //Debug.WriteLine(tick); + + if (machine != null) + { + Debug.WriteLine(machine.Variables["total labor"].ToJSON()); + } status = stateMachinesController.HandleStatus(id); - Thread.Sleep(0); // wait for the machine to complete + Thread.Sleep(1); // wait for the machine to complete tick++; } diff --git a/State Machine/Function Definitions/Math/AddNumber.cs b/State Machine/Function Definitions/Math/AddNumber.cs index f8a0d6b..16a90d8 100644 --- a/State Machine/Function Definitions/Math/AddNumber.cs +++ b/State Machine/Function Definitions/Math/AddNumber.cs @@ -17,7 +17,7 @@ void Setup() { { "a", new Parameter(StateMachineVariableType.Decimal.ToString().ToLower()) }, { "b", new Parameter(StateMachineVariableType.Decimal.ToString().ToLower()) }, - { "out", new Parameter(StateMachineVariableType.Decimal.ToString().ToLower(), VariableIO.Out) } + { "out", new Parameter(StateMachineVariableType.Decimal.ToString().ToLower(), io:VariableIO.Out) } }; } @@ -26,22 +26,17 @@ protected override void DefineFunction() Name = nameof(AddNumber); Function = () => { - var x = Parameters["a"]; - var y = Parameters["b"]; + var a = Get("a"); + var b = Get("b"); - var z = Parameters["out"]; - if (x is VariableDefinition a && y is VariableDefinition b && z is VariableDefinition result) - { + Debug.WriteLine("\t adding " + a + " + " + b + " " + (a + b).ToString()); - Debug.WriteLine($"{a} + {b} = {a.Value + b.Value}"); + Set("out", a + b); - result.Value = a.Value + b.Value; + return 1; - return 1; - } - return -1; }; } diff --git a/State Machine/Function Definitions/Math/ConvertFromDecimalToInteger.cs b/State Machine/Function Definitions/Math/ConvertFromDecimalToInteger.cs index bbc12bc..c602fd9 100644 --- a/State Machine/Function Definitions/Math/ConvertFromDecimalToInteger.cs +++ b/State Machine/Function Definitions/Math/ConvertFromDecimalToInteger.cs @@ -16,8 +16,8 @@ void Setup() Description = "Convert a decimal type variable to integer type variable. Rounds up if the value is 0.5 or greater."; ExpectedParameters = new Dictionary() { - { "decimal", new Parameter("decimal", VariableIO.In) }, - { "integer", new Parameter("integer", VariableIO.Out) }, + { "decimal", new Parameter("decimal", io:VariableIO.In) }, + { "integer", new Parameter("integer", io:VariableIO.Out) }, }; } diff --git a/State Machine/Function Definitions/Math/ConvertFromIntegerToDecimal.cs b/State Machine/Function Definitions/Math/ConvertFromIntegerToDecimal.cs index 46fb8a6..fa90ef7 100644 --- a/State Machine/Function Definitions/Math/ConvertFromIntegerToDecimal.cs +++ b/State Machine/Function Definitions/Math/ConvertFromIntegerToDecimal.cs @@ -15,8 +15,8 @@ void Setup() Description = "Convert an integer type variable to decimal type variable"; ExpectedParameters = new Dictionary() { - { "integer", new Parameter("integer", VariableIO.In) }, - { "decimal", new Parameter("decimal", VariableIO.Out) } + { "integer", new Parameter("integer", io:VariableIO.In) }, + { "decimal", new Parameter("decimal", io:VariableIO.Out) } }; } diff --git a/State Machine/Function Definitions/Math/DivideNumber.cs b/State Machine/Function Definitions/Math/DivideNumber.cs index 5607342..d3be124 100644 --- a/State Machine/Function Definitions/Math/DivideNumber.cs +++ b/State Machine/Function Definitions/Math/DivideNumber.cs @@ -30,30 +30,15 @@ protected override void DefineFunction() Name = nameof(DivideNumber); Function = () => { - var x = Parameters["a"]; - var y = Parameters["b"]; + var a = Get("a"); + var b = Get("b"); - var z = Parameters["out"]; - if (x is VariableDefinition aV && y is VariableDefinition bV && z is VariableDefinition resultV) - { - var b = bV.Value; - var a = aV.Value; + Debug.WriteLine("\t dividing " + a + " / " + b + " " + (a / b).ToString()); - if (b == 0) - { - Debug.WriteLine("Cannot divide by zero"); - return -1; - } + Set("out", a / b); - Debug.WriteLine($"{a} / {b} = {a / b}"); - - resultV.Value = a / b; - - return 1; - } - - return -1; + return 1; }; } diff --git a/State Machine/Function Definitions/Respond.cs b/State Machine/Function Definitions/Respond.cs index a94f1be..64950a0 100644 --- a/State Machine/Function Definitions/Respond.cs +++ b/State Machine/Function Definitions/Respond.cs @@ -1,4 +1,7 @@ -using ValkyrieFSMCore; +using System.Diagnostics; +using System.Text.Json; + +using ValkyrieFSMCore; namespace Valkyrie_Server.State_Machine.Function_Definitions { @@ -27,8 +30,17 @@ protected override void DefineFunction() if (StateMachine != null) { - StateMachine.Result = Get("data").ToString() ?? "nothing to respond"; - StateMachine.FallbackState = StateMachine.States.Find(x => x.Function.GetHashCode() == this.Function.GetHashCode()); //hijack the fallback state so the sm stops normally after this state + + var res = Parameters["data"]; + + + Debug.WriteLine($"Responding with {res.ToJSON()}"); + + StateMachine.Result = res.ToJSON(); + + var state = StateMachine.States.Find(x => x.Function.GetHashCode() == this.Function.GetHashCode()); + if (state != null) + state.FallbackState = true; //hijack the fallback state prop so the sm stops normally after this state return 1; } diff --git a/State Machine/Function Definitions/WM/EachProject.cs b/State Machine/Function Definitions/WM/EachProject.cs index 87d5965..6349e64 100644 --- a/State Machine/Function Definitions/WM/EachProject.cs +++ b/State Machine/Function Definitions/WM/EachProject.cs @@ -1,4 +1,6 @@ -namespace ValkyrieFSMCore +using System.Diagnostics; + +namespace ValkyrieFSMCore { public class EachProject : FunctionDefinition { @@ -25,13 +27,14 @@ protected override void DefineFunction() { Function = () => { - var proj = Get>("project"); + var proj = Get>("projects"); if (proj is List projects) { if (iterator < projects.Count) { Set("project", projects[iterator]); + Debug.WriteLine($"\t\t {iterator} -> {projects[iterator].Name}"); iterator++; return 0; } diff --git a/State Machine/Function Definitions/WM/GetProjects.cs b/State Machine/Function Definitions/WM/GetProjects.cs index d4abfd9..bfb300f 100644 --- a/State Machine/Function Definitions/WM/GetProjects.cs +++ b/State Machine/Function Definitions/WM/GetProjects.cs @@ -79,6 +79,11 @@ protected override void DefineFunction() if (projects == null) projects = new ProjectsListResult(); + foreach(var x in projects.projects) + { + Debug.WriteLine(x.Name); + } + Set("result", projects.projects); return 1; } diff --git a/State Machine/Function Definitions/WM/SplitProject.cs b/State Machine/Function Definitions/WM/SplitProject.cs index 202ca86..032919a 100644 --- a/State Machine/Function Definitions/WM/SplitProject.cs +++ b/State Machine/Function Definitions/WM/SplitProject.cs @@ -16,10 +16,10 @@ void Setup() ExpectedParameters = new Dictionary() { { "project", new Parameter("project") }, - { "name", new Parameter("string", VariableIO.Out) }, - { "id", new Parameter("string", VariableIO.Out) }, - { "TotalManHours", new Parameter("decimal", VariableIO.Out) }, - { "laborCost", new Parameter("decimal", VariableIO.Out) }, + { "name", new Parameter("string", required: false, io:VariableIO.Out) }, + { "id", new Parameter("string", required: false, io:VariableIO.Out) }, + { "TotalManHours", new Parameter("decimal", required: false, io:VariableIO.Out) }, + { "laborCost", new Parameter("decimal", required: false, io:VariableIO.Out) }, }; } @@ -31,10 +31,10 @@ protected override void DefineFunction() var project = Get("project"); - Set("name", project.Name); - Set("id", project.Id); - Set("TotalManHours", project.TotalManHours); - Set("laborCost", project.LaborCost); + TrySet("name", project.Name); + TrySet("id", project.Id); + TrySet("TotalManHours", project.TotalManHours); + TrySet("laborCost", project.LaborCost); return 1; }; diff --git a/State Machine/FunctionDefinition.cs b/State Machine/FunctionDefinition.cs index 35a4473..4e263ad 100644 --- a/State Machine/FunctionDefinition.cs +++ b/State Machine/FunctionDefinition.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Drawing; using System.Linq; using System.Threading.Tasks; @@ -33,6 +34,12 @@ public abstract class FunctionDefinition /// public string Description { get; set; } = ""; + + /// + /// The required param count + /// + public int RequiredParamCount => ExpectedParameters.Count(x => x.Value.Required); + /// /// The dictionary of expected parameters and types /// @@ -103,17 +110,17 @@ public T Get(string name) /// public bool TryGet(string name, out T? value) { - try - { - var param = GetVariableDefinitionParameter(name); - value = param.Value; - return true; - } - catch + + if (!Parameters.ContainsKey(name)) { value = default(T); return false; } + + var param = GetVariableDefinitionParameter(name); + value = param.Value; + return true; + } /// @@ -137,16 +144,14 @@ public void Set(string name, T value) /// public bool TrySet(string name, T value) { - try - { - var param = GetVariableDefinitionParameter(name); - param.Value = value; - return true; - } - catch + if (!Parameters.ContainsKey(name)) { return false; } + + var param = GetVariableDefinitionParameter(name); + param.Value = value; + return true; } /// @@ -157,17 +162,42 @@ public bool TrySet(string name, T value) /// public bool TryInjectParameters(Dictionary parameters, out string result) { - if (parameters.Count == ExpectedParameters.Count) + //if (parameters.Count >= RequiredParamCount) + //{ + + foreach (var x in parameters) { - foreach (var x in parameters) + Debug.WriteLine(x.Key + " " + x.Value.Key); + + if (ExpectedParameters.ContainsKey(x.Key) && !Parameters.ContainsKey(x.Key)) { - if (ExpectedParameters.ContainsKey(x.Key)) + + var paramType = ExpectedParameters[x.Key].Type; + var paramIo = ExpectedParameters[x.Key].IO; + + var valueType = x.Value.Type; + var valueIo = x.Value.IO; + + if (paramType == valueType) { - if (ExpectedParameters[x.Key].Type == x.Value.Type) + Parameters.Add(x.Key, x.Value); + ExpectedParameters[x.Key] = new Parameter(ExpectedParameters[x.Key].Type, parameterInjectedSuccessfully: true); + Debug.WriteLine("\t\t" + x.Key + " injected successfully"); + } + else + { + if (paramType.Trim().ToLower() == "any" && paramIo == VariableIO.In) + { + Parameters.Add(x.Key, x.Value); + ExpectedParameters[x.Key] = new Parameter(ExpectedParameters[x.Key].Type, parameterInjectedSuccessfully: true); + Debug.WriteLine("\t\t" + x.Key + " injected successfully"); + } + else if (valueType.Trim().ToLower() == "any" && valueIo == VariableIO.In) { Parameters.Add(x.Key, x.Value); ExpectedParameters[x.Key] = new Parameter(ExpectedParameters[x.Key].Type, parameterInjectedSuccessfully: true); + Debug.WriteLine("\t\t" + x.Key + " injected successfully"); } else { @@ -175,31 +205,41 @@ public bool TryInjectParameters(Dictionary parameter return false; } } - else - { + } + else + { - result = ""; - List keys = new List(); - foreach (var y in ExpectedParameters) + result = ""; + List keys = new List(); + foreach (var y in ExpectedParameters) + { + if (y.Value.InjectedSuccessfully == false) { - if (y.Value.InjectedSuccessfully == false) - { - keys.Add(y.Key); - } + keys.Add(y.Key); } - result = "Parameter mismatch. The expected parameters " + string.Join(", ", keys) + " were not provided for the function " + Name + "."; - return false; } + result = "Parameter mismatch. The expected parameters " + string.Join(", ", keys) + " were not provided for the function " + Name + "."; + return false; } - - result = "Success!"; - return true; } - else + + foreach (var x in ExpectedParameters) { - result = "Parameter count mismatch. The expected number of parameters is " + ExpectedParameters.Count + " but " + parameters.Count + " were provided."; - return false; + if (x.Value.Required && x.Value.InjectedSuccessfully == false) + { + result = "Parameter mismatch. The expected parameter " + x.Key + " was not provided for the function " + Name + "."; + return false; + } } + + result = "Success!"; + return true; + //} + //else + //{ + // result = "Parameter count mismatch. The expected number of connected parameters should be at least " + ExpectedParameters.Count + " but only " + parameters.Count + " were provided for the function " + Name + "."; + // return false; + //} } protected abstract void DefineFunction(); diff --git a/State Machine/KeyTypeDefinition.cs b/State Machine/KeyTypeDefinition.cs index 9deb1b2..190f2f6 100644 --- a/State Machine/KeyTypeDefinition.cs +++ b/State Machine/KeyTypeDefinition.cs @@ -130,5 +130,10 @@ public void SetValue(double value) { this.Value = value.ToString(); } + + public string ToJSON() + { + return System.Text.Json.JsonSerializer.Serialize(this); + } } } \ No newline at end of file diff --git a/State Machine/Parameter.cs b/State Machine/Parameter.cs index b2cbfd0..32abd86 100644 --- a/State Machine/Parameter.cs +++ b/State Machine/Parameter.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Text.Json; using System.Threading.Tasks; namespace ValkyrieFSMCore @@ -33,12 +34,23 @@ public struct Parameter : IVariableSignature /// public string Description { get; set; } = ""; - public Parameter(string type, VariableIO io = VariableIO.In, bool parameterInjectedSuccessfully = false, string description = "") + /// + /// Is this param required? + /// + public bool Required { get; set; } = false; + + public Parameter(string type, VariableIO io = VariableIO.In, bool required = true, bool parameterInjectedSuccessfully = false, string description = "") { Type = type; this.InjectedSuccessfully = parameterInjectedSuccessfully; this.IO = io; this.Description = description; + this.Required = required; + } + + public string ToJSON() + { + return JsonSerializer.Serialize(this); } } } \ No newline at end of file diff --git a/State Machine/StateMachine.cs b/State Machine/StateMachine.cs index d6f6746..f4aab03 100644 --- a/State Machine/StateMachine.cs +++ b/State Machine/StateMachine.cs @@ -102,7 +102,7 @@ private void RunStateMachine() IsRunning = true; - while (CurrentState != FallbackState) + while (CurrentState != FallbackState || CurrentState != null && CurrentState.FallbackState) { Evaluate(); } @@ -145,7 +145,7 @@ public void Evaluate() { int result = CurrentState.Function(); // execute the function - if (CurrentState == FallbackState) + if (CurrentState == FallbackState || CurrentState.FallbackState) { Debug.WriteLine("the current state is the fallback state, exiting."); Completed = true; diff --git a/State Machine/StateMachineBuilder.cs b/State Machine/StateMachineBuilder.cs index 17de4f3..40644f8 100644 --- a/State Machine/StateMachineBuilder.cs +++ b/State Machine/StateMachineBuilder.cs @@ -302,6 +302,9 @@ public StateMachine ParseInstructionsJSON(string json) if (_factory.TryConstructVariable(name, type, out IVariableSignature? variableConstructionResult, ioResult)) { + + Debug.WriteLine(name); + if (variableConstructionResult != null) _variables.Add(name, variableConstructionResult); else @@ -348,23 +351,31 @@ public StateMachine ParseInstructionsJSON(string json) createdVariables = true; } + Debug.WriteLine("\n\n\n\n"); + foreach (var x in functionsJson.EnumerateArray()) { var name = x.GetProperty("name").GetString(); var parameters = x.GetProperty("parameters"); - // var code = x.GetProperty("code").GetString(); + var functionName = name ?? ""; + // var code = x.GetProperty("code").GetString(); + if (name != null && name.Contains(" ")) + { + functionName = name.Split(" ")[0]; + } + Console.WriteLine($"function: ${name} function name: {functionName}"); Dictionary parameterList = new Dictionary(); Dictionary injectionVariables = new Dictionary(); - if (name == null) + if (name == null || functionName == null) throw new Exception($"Invalid function definition. A valid name must be given after the definition."); - if (!_functionLibrary.TryGetFunction(name, out var function)) + if (!_functionLibrary.TryGetFunction(functionName, out var function)) throw new Exception($"Invalid function definition. The function {name} does not exist."); if (function == null) @@ -374,15 +385,23 @@ public StateMachine ParseInstructionsJSON(string json) { var paramName = y.GetProperty("name").GetString(); var paramType = y.GetProperty("type").GetString(); - var varToConnectName = y.GetProperty("connectVar").ToString(); + var varToConnectName = y.GetProperty("connectVar").GetString(); //var overrideType = ""; + if (varToConnectName == null) + { + throw new Exception("var to connect name is null"); + } + if (paramName == null) { throw new Exception($"Invalid function parameter definition. A valid name must be given after the definition."); } + + Debug.WriteLine($"{paramName} : {varToConnectName}"); + // #region unity specific //var extResult = ParseExtraneousVariables(varToConnectName); @@ -429,26 +448,36 @@ public StateMachine ParseInstructionsJSON(string json) $"in the variable factory so it can be properly created upon building the state machine. ({paramName} : {paramType})"); - parameterList.Add(paramName, new Parameter(paramType, parameterInjectedSuccessfully: true)); + parameterList.Add(paramName, new Parameter(paramType, parameterInjectedSuccessfully: false)); - if (!_variables.TryGetValue(varToConnectName, out var variable)) - throw new Exception($"Invalid function parameter definition. The connection variable \"{varToConnectName}\" does not exist. ({name} - {paramName} : {paramType})"); - if (variable == null) - throw new Exception($"Invalid function parameter definition. The connection variable \"{varToConnectName}\" cannot be generated. ({name} - {paramName} : {paramType})"); + if (varToConnectName.Length > 0) + { + + if (!_variables.TryGetValue(varToConnectName, out var variable)) + throw new Exception($"Invalid function parameter definition. The connection variable \"{varToConnectName}\" does not exist. ({name} - {paramName} : {paramType})"); - if (variable.Type != paramType) - throw new Exception($"Invalid function parameter definition. The connection variable \"{varToConnectName}\" is not of type {paramType}. ({name} - {paramName} : {paramType})"); + if (variable == null) + throw new Exception($"Invalid function parameter definition. The connection variable \"{varToConnectName}\" cannot be generated. ({name} - {paramName} : {paramType})"); - injectionVariables.Add(paramName, variable); + //if (variable.Type != paramType) + // throw new Exception($"Invalid function parameter definition. The connection variable \"{varToConnectName}\" is not of type {paramType}. ({name} - {paramName} : {paramType})"); + + if (variable != null) + injectionVariables.Add(paramName, variable); + } } function.ExpectedParameters = parameterList; + Debug.WriteLine(function.Name); bool injectionResult = function.TryInjectParameters(injectionVariables, out var result2); if (!injectionResult) - throw new Exception($"{result2}"); + { + Debug.WriteLine(result2); + } + //throw new Exception($"{result2}"); if (_functions.ContainsKey(name)) throw new Exception($"Invalid function definition. The function {name} already exists."); diff --git a/State Machine/VariableTypes/IVariableSignature.cs b/State Machine/VariableTypes/IVariableSignature.cs index 74cabf0..cf1edee 100644 --- a/State Machine/VariableTypes/IVariableSignature.cs +++ b/State Machine/VariableTypes/IVariableSignature.cs @@ -26,5 +26,11 @@ public interface IVariableSignature /// This is the description of the variable /// public string Description { get; set; } + + /// + /// convert the variable data to json + /// + /// + public string ToJSON(); } } diff --git a/State Machine/VariableTypes/ObjectType.cs b/State Machine/VariableTypes/ObjectType.cs index d44d31a..0cd1211 100644 --- a/State Machine/VariableTypes/ObjectType.cs +++ b/State Machine/VariableTypes/ObjectType.cs @@ -47,5 +47,10 @@ public bool TryGetItem(string name, out T? res) where T : IVariableSignature res = default(T); return false; } + + public string ToJSON() + { + return System.Text.Json.JsonSerializer.Serialize(this); + } } } \ No newline at end of file diff --git a/State Machine/VariableTypes/VariableDefinition.cs b/State Machine/VariableTypes/VariableDefinition.cs index a813a44..ee31776 100644 --- a/State Machine/VariableTypes/VariableDefinition.cs +++ b/State Machine/VariableTypes/VariableDefinition.cs @@ -1,4 +1,6 @@  +using System.Text.Json; + namespace ValkyrieFSMCore { /// @@ -77,5 +79,9 @@ public static VariableDefinition CreateCustom(string key, string type, T valu #endregion + public string ToJSON() + { + return JsonSerializer.Serialize(Value); + } } } diff --git a/StateMachinesController.cs b/StateMachinesController.cs index 7a4f42c..a130a02 100644 --- a/StateMachinesController.cs +++ b/StateMachinesController.cs @@ -49,7 +49,7 @@ public StateMachinesController(float timeoutSeconds) /// /// the id of the machine /// the state machine - public void AddMachine(string id, string instructions) + public StateMachine AddMachine(string id, string instructions) { if (string.IsNullOrEmpty(id)) @@ -65,8 +65,11 @@ public void AddMachine(string id, string instructions) machine.IsRunning = true; Machines.Add(id, (machine, DateTime.UtcNow)); + if (!IsTicking) Boot(); + + return machine; } /// @@ -74,14 +77,14 @@ public void AddMachine(string id, string instructions) /// private void Tick() { - Debug.WriteLine("tick " + Machines.Count); + //Debug.WriteLine("tick " + Machines.Count); foreach (var x in Machines) { if (!x.Value.machine.Completed) { - if((DateTime.UtcNow - x.Value.time).TotalSeconds > TimoutSeconds) + if ((DateTime.UtcNow - x.Value.time).TotalSeconds > TimoutSeconds) { Debug.WriteLine("Killing state machine " + x.Key + " due to timeout"); KillStateMachineProcess(x.Key); diff --git a/ValkyrieServerController.cs b/ValkyrieServerController.cs index c47be2e..c9e6e17 100644 --- a/ValkyrieServerController.cs +++ b/ValkyrieServerController.cs @@ -23,7 +23,7 @@ public class ValkyrieServerController /// /// the base URI for the Valkyrie server /// - private Uri selectedURI = prodGetDataURI; + private Uri selectedURI = testGetDataURI; public ValkyrieServerController() { @@ -60,8 +60,10 @@ public ValkyrieServerController() //Debug.WriteLine("\n\n\t" + selectedURI + "\n"); //Debug.WriteLine("\n\n\t" + data + "\n"); - var response = await client.PostAsync(selectedURI, content); + Debug.WriteLine(ValkyrieAPIKey); + client.DefaultRequestHeaders.Add("x-api-key", ValkyrieAPIKey); + var response = await client.PostAsync(selectedURI, content); using StreamReader reader = new StreamReader(response.Content.ReadAsStream()); reader.BaseStream.Seek(0, SeekOrigin.Begin); diff --git a/appsettings.json b/appsettings.json index 3a9594b..83fa3f8 100644 --- a/appsettings.json +++ b/appsettings.json @@ -8,6 +8,6 @@ "AllowedHosts": "*", "API_KEY": "some api key", "VALK_DASHBOARD_LINK": "https://valkyrie-nu.vercel.app/dashboard", - "VERSION": "1.0.0" + "VERSION": "0.7.2" }