mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-11-02 11:47:56 +00:00
Fixing ActionLinks
This commit is contained in:
@@ -48,7 +48,7 @@ namespace OpenWifi {
|
||||
StorageService()->SentAction(i.id);
|
||||
} else if (i.action==OpenWifi::SecurityObjects::LinkActions::VERIFY_EMAIL) {
|
||||
if(AuthService::SendEmailToUser(i.id, i.userId, AuthService::EMAIL_VERIFICATION)) {
|
||||
Logger_.information(Poco::format("Send password reset link to %s",i.userId));
|
||||
Logger_.information(Poco::format("Send email verification link to %s",i.userId));
|
||||
}
|
||||
StorageService()->SentAction(i.id);
|
||||
} else {
|
||||
|
||||
@@ -359,7 +359,7 @@ namespace OpenWifi {
|
||||
A.id = MicroService::instance().CreateUUID();
|
||||
A.created = std::time(nullptr);
|
||||
A.expires = A.created + 24*60*60;
|
||||
Storage().CreateAction(A);
|
||||
StorageService()->CreateAction(A);
|
||||
UInfo.waitingForEmailCheck = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace OpenWifi {
|
||||
auto Id = GetParameter("id","");
|
||||
|
||||
SecurityObjects::ActionLink Link;
|
||||
if(!Storage().GetActionLink(Id,Link))
|
||||
if(!StorageService()->GetActionLink(Id,Link))
|
||||
return DoReturnA404();
|
||||
|
||||
if(Action=="password_reset")
|
||||
@@ -34,7 +34,7 @@ namespace OpenWifi {
|
||||
auto Id = GetParameter("id","");
|
||||
|
||||
SecurityObjects::ActionLink Link;
|
||||
if(!Storage().GetActionLink(Id,Link))
|
||||
if(!StorageService()->GetActionLink(Id,Link))
|
||||
return DoReturnA404();
|
||||
|
||||
Logger_.information(Poco::format("COMPLETE-PASSWORD-RESET(%s): For ID=%s", Request->clientAddress().toString(), Link.userId));
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace OpenWifi {
|
||||
NewLink.userId = userId;
|
||||
NewLink.created = std::time(nullptr);
|
||||
NewLink.expires = NewLink.created + (24*60*60);
|
||||
Storage().CreateAction(NewLink);
|
||||
StorageService()->CreateAction(NewLink);
|
||||
|
||||
Poco::JSON::Object ReturnObj;
|
||||
SecurityObjects::UserInfoAndPolicy UInfo;
|
||||
|
||||
@@ -103,8 +103,6 @@ namespace OpenWifi {
|
||||
DBType dbType_ = sqlite;
|
||||
};
|
||||
|
||||
// inline StorageClass * Storage() { return StorageClass::instance(); }
|
||||
|
||||
#ifdef SMALL_BUILD
|
||||
int Service::Setup_MySQL() { Daemon()->exit(Poco::Util::Application::EXIT_CONFIG); return 0; }
|
||||
int Service::Setup_PostgreSQL() { Daemon()->exit(Poco::Util::Application::EXIT_CONFIG); return 0; }
|
||||
|
||||
Reference in New Issue
Block a user