refactor: rename DTree to DValue
This commit is contained in:
@@ -107,7 +107,7 @@ bool cpp_type(String word)
|
||||
{
|
||||
return(
|
||||
word == "String" ||
|
||||
word == "DTree" ||
|
||||
word == "DValue" ||
|
||||
word == "Request" ||
|
||||
word == "StringList" ||
|
||||
word == "StringMap" ||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
DTree get_config()
|
||||
DValue get_config()
|
||||
{
|
||||
DTree config;
|
||||
DValue config;
|
||||
|
||||
config["site"]["name"] = "UCE Starter";
|
||||
config["site"]["default_page_title"] = "Home";
|
||||
|
||||
+3
-3
@@ -31,7 +31,7 @@ void render_link_card(String href, String title, String body, String meta)
|
||||
|
||||
void render_code_example(Request& context, String eyebrow, String title, String summary, String code, String note, String language = "uce")
|
||||
{
|
||||
DTree props;
|
||||
DValue props;
|
||||
props["eyebrow"] = eyebrow;
|
||||
props["title"] = title;
|
||||
props["summary"] = summary;
|
||||
@@ -84,7 +84,7 @@ RENDER(Request& context)
|
||||
"}\n\n"
|
||||
"RENDER(Request& context)\n"
|
||||
"{\n"
|
||||
"\tDTree props;\n"
|
||||
"\tDValue props;\n"
|
||||
"\tprops[\"title\"] = \"Shipping note\";\n"
|
||||
"\tprops[\"body\"] = \"Components are just .uce files with structured props.\";\n"
|
||||
"\t<>\n"
|
||||
@@ -115,7 +115,7 @@ RENDER(Request& context)
|
||||
"}\n\n"
|
||||
"WS(Request& context)\n"
|
||||
"{\n"
|
||||
"\tDTree payload = json_decode(context.in);\n"
|
||||
"\tDValue payload = json_decode(context.in);\n"
|
||||
"\tString connection_id = context.params[\"WS_CONNECTION_ID\"];\n"
|
||||
"\tcontext.connection[\"name\"] = payload[\"name\"];\n"
|
||||
"\tpayload[\"connection_id\"] = connection_id;\n"
|
||||
|
||||
Reference in New Issue
Block a user