Fix JSON serialization

This commit is contained in:
Omar Roth
2020-03-29 17:44:45 -04:00
parent 0e58d99f4e
commit 3b2e142542
10 changed files with 76 additions and 56 deletions

View File

@@ -46,9 +46,11 @@
</div>
<script id="watched_data" type="application/json">
<%=
{
"csrf_token": "<%= URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "") %>"
}
"csrf_token" => URI.encode_www_form(env.get?("csrf_token").try &.as(String) || "")
}.to_pretty_json
%>
</script>
<script src="/js/watched_widget.js"></script>