Introducing HandlerConfig class to give handlers config values they need

此提交包含在:
2019-09-29 20:27:53 +02:00
父節點 364d82a99f
當前提交 0ccc20454b
共有 8 個檔案被更改,包括 36 行新增33 行删除

查看文件

@@ -15,14 +15,16 @@ class RequestWorker
Template *templ;
UrlProvider *urlProvider;
ICache *cache;
HandlerConfig *handlerConfig;
std::unique_ptr<SessionDao> sessionDao;
private:
Session retrieveSession(std::string token) const;
public:
RequestWorker(Database &db, Template &templ, UrlProvider &provider, ICache &cache)
RequestWorker(HandlerConfig &handlerConfig, Database &db, Template &templ, UrlProvider &provider, ICache &cache)
{
this->handlerConfig = &handlerConfig;
this->db = &db;
this->templ = &templ;
this->urlProvider = &provider;