|
@@ -69,7 +69,9 @@ namespace TEAMModelOS.Function
|
|
|
public async Task<IActionResult> SystemInfo([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req)
|
|
|
{
|
|
|
_logger.LogInformation("C# HTTP trigger function processed a request.");
|
|
|
-
|
|
|
+ // string data1 = await req.ReadBodyContentAsync();
|
|
|
+
|
|
|
+
|
|
|
Type attr = this.GetType();
|
|
|
string currentDirectory = Path.GetDirectoryName(attr.Assembly.Location);
|
|
|
Assembly assembly = Assembly.LoadFrom($"{currentDirectory}\\TEAMModelOS.FunctionV4.dll");
|
|
@@ -92,14 +94,15 @@ namespace TEAMModelOS.Function
|
|
|
return new OkObjectResult(new { version, description, nowtime });
|
|
|
}
|
|
|
[Function("surplus-space-notify")]
|
|
|
- public IActionResult SurplusSpaceNotify([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req)
|
|
|
+ public async Task <IActionResult> SurplusSpaceNotify([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req)
|
|
|
{
|
|
|
string msg = "";
|
|
|
+ string data = await new StreamReader(req.Body).ReadToEndAsync();
|
|
|
_backgroundWorkerQueue.QueueBackgroundWorkItem(async token =>
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- string data = await new StreamReader(req.Body).ReadToEndAsync();
|
|
|
+
|
|
|
var json = JsonDocument.Parse(data).RootElement;
|
|
|
json.TryGetProperty("name", out JsonElement _name);
|
|
|
json.TryGetProperty("scope", out JsonElement _scope);
|