Config: Require rooturl,atomurl

This commit is contained in:
Albert S. 2022-03-27 19:50:51 +02:00
父節點 4854ea85f2
當前提交 9520aabe5c
共有 2 個文件被更改,包括 5 次插入0 次删除

查看文件

@ -24,6 +24,7 @@ SOFTWARE.
#include "config.h" #include "config.h"
#include "permissions.h" #include "permissions.h"
#include "varreplacer.h" #include "varreplacer.h"
std::string Config::required(const std::string &key) std::string Config::required(const std::string &key)
{ {
auto it = this->configmap.find(key); auto it = this->configmap.find(key);
@ -96,6 +97,8 @@ Config::Config(const std::map<std::string, std::string> &map)
this->urls.deletionurl = required("deletionurl"); this->urls.deletionurl = required("deletionurl");
this->urls.adminregisterurl = required("adminregisterurl"); this->urls.adminregisterurl = required("adminregisterurl");
this->urls.usersettingsurl = required("usersettingsurl"); this->urls.usersettingsurl = required("usersettingsurl");
this->urls.rooturl = required("rooturl");
this->urls.atomurl = required("atomurl");
this->connectionstring = required("connectionstring"); this->connectionstring = required("connectionstring");
this->handlersConfig.max_pagename_length = optional("max_pagename_length", 256); this->handlersConfig.max_pagename_length = optional("max_pagename_length", 256);

查看文件

@ -41,6 +41,8 @@ struct ConfigUrls
std::string linkhistorysort; std::string linkhistorysort;
std::string adminregisterurl; std::string adminregisterurl;
std::string usersettingsurl; std::string usersettingsurl;
std::string rooturl;
std::string atomurl;
}; };
class ConfigVariableResolver class ConfigVariableResolver