refactor: prime cache formatter beautify
This commit is contained in:
parent
b141419b14
commit
5bb92d02dd
|
|
@ -50,9 +50,9 @@ namespace Microsoft.AspNetCore.AngularServices
|
||||||
private static string FormatAsScript(string url, HttpStatusCode responseStatusCode, string responseBody)
|
private static string FormatAsScript(string url, HttpStatusCode responseStatusCode, string responseBody)
|
||||||
=>
|
=>
|
||||||
"<script>" +
|
"<script>" +
|
||||||
"window.__preCachedResponses = window.__preCachedResponses || {{}}; " +
|
"window.__preCachedResponses = window.__preCachedResponses || {}; " +
|
||||||
$"window.__preCachedResponses[{JsonConvert.SerializeObject(url)}] " +
|
$"window.__preCachedResponses[{JsonConvert.SerializeObject(url)}] " +
|
||||||
$"= {JsonConvert.SerializeObject(new { statusCode = responseStatusCode, body = responseBody })};" +
|
$"= {JsonConvert.SerializeObject(new { statusCode = responseStatusCode, body = responseBody })};" +
|
||||||
"</script>";
|
"</script>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue