mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Can start without NBXplorer being ready
This commit is contained in:
@@ -71,10 +71,10 @@ namespace BTCPayServer
|
||||
return res;
|
||||
}
|
||||
|
||||
public static HtmlString ToSrvModel(this object o)
|
||||
public static HtmlString ToJSVariableModel(this object o, string variableName)
|
||||
{
|
||||
var encodedJson = JavaScriptEncoder.Default.Encode(o.ToJson());
|
||||
return new HtmlString("var srvModel = JSON.parse('" + encodedJson + "');");
|
||||
return new HtmlString($"var {variableName} = JSON.parse('" + encodedJson + "');");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user