Moving ActionLinks into ORM

This commit is contained in:
stephb9959
2021-12-27 22:24:15 -08:00
parent d202b9e365
commit 2c513d8374
14 changed files with 199 additions and 315 deletions

View File

@@ -21,12 +21,14 @@ namespace OpenWifi {
UserTokenDB_ = std::make_unique<OpenWifi::BaseTokenDB>("Tokens", "tok", dbType_,*Pool_, Logger());
SubTokenDB_ = std::make_unique<OpenWifi::BaseTokenDB>("SubTokens", "stk", dbType_,*Pool_, Logger());
PreferencesDB_ = std::make_unique<OpenWifi::PreferencesDB>("Preferences", "pre", dbType_,*Pool_, Logger());
ActionLinksDB_ = std::make_unique<OpenWifi::ActionLinkDB>("Actions", "act", dbType_,*Pool_, Logger());
UserDB_->Create();
SubDB_->Create();
UserTokenDB_->Create();
SubTokenDB_->Create();
PreferencesDB_->Create();
ActionLinksDB_->Create();
UserDB_->InitializeDefaultUser();
@@ -50,7 +52,7 @@ namespace OpenWifi {
StorageService()->SubTokenDB().CleanExpiredTokens();
StorageService()->UserTokenDB().CleanExpiredTokens();
logger.information("Squiggy the DB: removing old actionLinks.");
StorageService()->CleanOldActionLinks();
StorageService()->ActionLinksDB().CleanOldActionLinks();
}
}