Fixing improper DB setup identification.

This commit is contained in:
stephb9959
2021-10-06 08:42:33 -07:00
parent 467c6edc23
commit f25047cbe7
12 changed files with 218 additions and 27 deletions

View File

@@ -23,6 +23,7 @@
#include "AuthService.h"
#include "RESTAPI_SecurityObjects.h"
#include "SubSystemServer.h"
#include "Storage.h"
namespace OpenWifi {
@@ -66,19 +67,9 @@ namespace OpenWifi {
};
class Storage : public SubSystemServer {
public:
enum StorageType {
sqlite,
pgsql,
mysql
};
enum AUTH_ERROR {
SUCCESS,
PASSWORD_CHANGE_REQUIRED,
@@ -169,11 +160,10 @@ namespace OpenWifi {
bool CompleteAction(std::string &ActionId);
bool CancelAction(std::string &ActionId);
private:
static Storage *instance_;
std::unique_ptr<Poco::Data::SessionPool> Pool_= nullptr;
StorageType dbType_ = sqlite;
DBType dbType_ = sqlite;
std::unique_ptr<Poco::Data::SQLite::Connector> SQLiteConn_= nullptr;
#ifndef SMALL_BUILD
std::unique_ptr<Poco::Data::PostgreSQL::Connector> PostgresConn_= nullptr;