Loading src/blogi.cpp +7 −3 Original line number Diff line number Diff line Loading @@ -404,13 +404,17 @@ void blogi::Blogi::api(libhttppp::HttpRequest& curreq, const int tid){ json_object *params = nullptr; json_object_object_get_ex(single_request, "params", ¶ms); std::string renderedHtml; json_object *html_obj = nullptr; if (json_object_object_get_ex(single_request, "html", &html_obj)) { const char *h = json_object_get_string(html_obj); if (h) renderedHtml = h; } bool found = false; for (const Plugin::PluginData *curplg = BlogiPlg->getFirstPlugin(); curplg; curplg = curplg->getNextPlg()) { PluginApi *api = curplg->getInstace(); if (api && api->canPublish() && api->getName() == targetPlugin) { // For API-only publish: the rendered HTML is not provided here, // the plugin should use an empty string or handle accordingly std::string renderedHtml; api->Publish(tid, renderedHtml, params, single_response); found = true; break; Loading Loading
src/blogi.cpp +7 −3 Original line number Diff line number Diff line Loading @@ -404,13 +404,17 @@ void blogi::Blogi::api(libhttppp::HttpRequest& curreq, const int tid){ json_object *params = nullptr; json_object_object_get_ex(single_request, "params", ¶ms); std::string renderedHtml; json_object *html_obj = nullptr; if (json_object_object_get_ex(single_request, "html", &html_obj)) { const char *h = json_object_get_string(html_obj); if (h) renderedHtml = h; } bool found = false; for (const Plugin::PluginData *curplg = BlogiPlg->getFirstPlugin(); curplg; curplg = curplg->getNextPlg()) { PluginApi *api = curplg->getInstace(); if (api && api->canPublish() && api->getName() == targetPlugin) { // For API-only publish: the rendered HTML is not provided here, // the plugin should use an empty string or handle accordingly std::string renderedHtml; api->Publish(tid, renderedHtml, params, single_response); found = true; break; Loading