summaryrefslogtreecommitdiffhomepage
path: root/plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugin.cpp')
-rw-r--r--plugin.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugin.cpp b/plugin.cpp
index 28fdb62..afcbdb3 100644
--- a/plugin.cpp
+++ b/plugin.cpp
@@ -64,22 +64,23 @@ void PluginLoader::load_plugins()
}
}
+// validate config regarding plugins
bool PluginLoader::validate_config()
{
const auto& sites{m_config.Sites()};
for (const auto& site: sites) {
- for (const auto& path: site.paths) {
+ for (const auto& path: site.second.paths) {
// path must contain target and plugin
auto it {path.params.find("target")};
if (it == path.params.end()) {
- std::cout << "Path " << path.requested << " for site " << site.name << " is missing target specification." << std::endl;
+ std::cout << "Path " << path.requested << " for site " << site.first << " is missing target specification." << std::endl;
return false;
}
it = path.params.find("plugin");
if (it == path.params.end()) {
- std::cout << "Path " << path.requested << " for site " << site.name << " is missing plugin specification." << std::endl;
+ std::cout << "Path " << path.requested << " for site " << site.first << " is missing plugin specification." << std::endl;
return false;
}