mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
refactor: prime cache formatter beautify
This commit is contained in:
@@ -50,7 +50,7 @@ namespace Microsoft.AspNetCore.AngularServices
|
||||
private static string FormatAsScript(string url, HttpStatusCode responseStatusCode, string responseBody)
|
||||
=>
|
||||
"<script>" +
|
||||
"window.__preCachedResponses = window.__preCachedResponses || {{}}; " +
|
||||
"window.__preCachedResponses = window.__preCachedResponses || {}; " +
|
||||
$"window.__preCachedResponses[{JsonConvert.SerializeObject(url)}] " +
|
||||
$"= {JsonConvert.SerializeObject(new { statusCode = responseStatusCode, body = responseBody })};" +
|
||||
"</script>";
|
||||
|
||||
Reference in New Issue
Block a user