mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-11-02 03:37:51 +00:00
Refactor users/tokens into orm.
This commit is contained in:
@@ -15,7 +15,7 @@ namespace OpenWifi {
|
||||
if(QB_.Select.empty()) {
|
||||
Poco::JSON::Array ArrayObj;
|
||||
Poco::JSON::Object Answer;
|
||||
if (StorageService()->SubDB().GetUsers(QB_.Offset, QB_.Limit, Users)) {
|
||||
if (StorageService()->UserDB().GetUsers(QB_.Offset, QB_.Limit, Users)) {
|
||||
for (auto &i : Users) {
|
||||
Poco::JSON::Object Obj;
|
||||
if (IdOnly) {
|
||||
@@ -36,7 +36,7 @@ namespace OpenWifi {
|
||||
for(auto &i:SelectedRecords()) {
|
||||
SecurityObjects::UserInfo UInfo;
|
||||
auto tI{i};
|
||||
if(StorageService()->SubDB().GetUserById(tI,UInfo)) {
|
||||
if(StorageService()->UserDB().GetUserById(tI,UInfo)) {
|
||||
Poco::JSON::Object Obj;
|
||||
if (IdOnly) {
|
||||
ArrayObj.add(UInfo.Id);
|
||||
|
||||
@@ -67,13 +67,14 @@ namespace OpenWifi {
|
||||
|
||||
private:
|
||||
int Create_Tables();
|
||||
int Create_UserTable();
|
||||
int Create_AvatarTable();
|
||||
int Create_TokensTable();
|
||||
int Create_ActionLinkTable();
|
||||
int Create_Preferences();
|
||||
int Create_SubTokensTable();
|
||||
int Create_SubscriberTable();
|
||||
|
||||
// int Create_UserTable();
|
||||
// int Create_TokensTable();
|
||||
// int Create_SubTokensTable();
|
||||
// int Create_SubscriberTable();
|
||||
|
||||
std::unique_ptr<OpenWifi::BaseUserDB> UserDB_;
|
||||
std::unique_ptr<OpenWifi::BaseUserDB> SubDB_;
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace OpenWifi {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
int StorageService::Create_UserTable() {
|
||||
Poco::Data::Session Sess = Pool_->get();
|
||||
|
||||
@@ -71,7 +72,7 @@ namespace OpenWifi {
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
*/
|
||||
int StorageService::Create_ActionLinkTable() {
|
||||
try {
|
||||
Poco::Data::Session Sess = Pool_->get();
|
||||
@@ -106,7 +107,7 @@ namespace OpenWifi {
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
int StorageService::Create_TokensTable() {
|
||||
try {
|
||||
Poco::Data::Session Sess = Pool_->get();
|
||||
@@ -132,6 +133,7 @@ namespace OpenWifi {
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
*/
|
||||
|
||||
int StorageService::Create_Preferences() {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user