This commit is contained in:
@@ -66,6 +66,10 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
string sResult = await GetTheMetrics("plain");
|
||||
|
||||
//Log
|
||||
EventLogProcessor.AddEntry(new Event(UserIdFromContext.Id(HttpContext.Items), 0, AyaType.Metrics, AyaEvent.Retrieved), ct);
|
||||
|
||||
return Content(sResult);
|
||||
}
|
||||
|
||||
@@ -91,14 +95,12 @@ namespace AyaNova.Api.Controllers
|
||||
return StatusCode(401, new ApiNotAuthorizedResponse());
|
||||
}
|
||||
|
||||
string sResult = await GetTheMetrics("json");
|
||||
|
||||
//return Ok(new ApiOkResponse(new { metrics = sResult }));
|
||||
// /THIS IS NOT RETURNING VALID PARSEABLE JSON, FIX IT
|
||||
//IDEAS:
|
||||
//try parsing the result first then return it
|
||||
//
|
||||
string sResult = await GetTheMetrics("json");
|
||||
JObject json = JObject.Parse(sResult);
|
||||
|
||||
//Log
|
||||
EventLogProcessor.AddEntry(new Event(UserIdFromContext.Id(HttpContext.Items), 0, AyaType.Metrics, AyaEvent.Retrieved), ct);
|
||||
|
||||
return Ok(new ApiOkResponse(json));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user