Removed WebServerRequest parameter from get_and_render_template() in HTMLTemplate.

This commit is contained in:
Relintai 2024-02-26 11:56:01 +01:00
parent 2fe82c604c
commit 81c8e4aa75
2 changed files with 4 additions and 4 deletions

View File

@ -467,7 +467,7 @@ String HTMLTemplate::render_template(const String &p_text, const Dictionary &p_d
return result; return result;
} }
String HTMLTemplate::get_and_render_template(const StringName &p_name, const Ref<WebServerRequest> &p_request, const Dictionary &p_data) { String HTMLTemplate::get_and_render_template(const StringName &p_name, const Dictionary &p_data) {
String text = get_template_text(p_name); String text = get_template_text(p_name);
return render_template(text, p_data); return render_template(text, p_data);
@ -729,7 +729,7 @@ void HTMLTemplate::_bind_methods() {
ClassDB::bind_method(D_METHOD("process_template_expression", "expression", "data"), &HTMLTemplate::process_template_expression); ClassDB::bind_method(D_METHOD("process_template_expression", "expression", "data"), &HTMLTemplate::process_template_expression);
ClassDB::bind_method(D_METHOD("render_template", "text", "data"), &HTMLTemplate::render_template); ClassDB::bind_method(D_METHOD("render_template", "text", "data"), &HTMLTemplate::render_template);
ClassDB::bind_method(D_METHOD("get_and_render_template", "name", "request", "data"), &HTMLTemplate::get_and_render_template); ClassDB::bind_method(D_METHOD("get_and_render_template", "name", "data"), &HTMLTemplate::get_and_render_template);
BIND_VMETHOD(MethodInfo(Variant::STRING, "_render", BIND_VMETHOD(MethodInfo(Variant::STRING, "_render",
PropertyInfo(Variant::OBJECT, "request", PROPERTY_HINT_RESOURCE_TYPE, "WebServerRequest"), PropertyInfo(Variant::OBJECT, "request", PROPERTY_HINT_RESOURCE_TYPE, "WebServerRequest"),

View File

@ -92,7 +92,7 @@ public:
String process_template_expression(const String &p_expression, const Dictionary &p_data); String process_template_expression(const String &p_expression, const Dictionary &p_data);
String render_template(const String &p_text, const Dictionary &p_data); String render_template(const String &p_text, const Dictionary &p_data);
String get_and_render_template(const StringName &p_name, const Ref<WebServerRequest> &p_request, const Dictionary &p_data); String get_and_render_template(const StringName &p_name, const Dictionary &p_data);
String render(const Ref<WebServerRequest> &p_request, const Dictionary &p_data); String render(const Ref<WebServerRequest> &p_request, const Dictionary &p_data);
virtual String _render(const Ref<WebServerRequest> &p_request, const Dictionary &p_data); virtual String _render(const Ref<WebServerRequest> &p_request, const Dictionary &p_data);