]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/configuration/sgconfig/parser_tariff.cpp
Rename BASE_AUTH and BASE_STORE to AUTH and STORE
[stg.git] / projects / stargazer / plugins / configuration / sgconfig / parser_tariff.cpp
index e3b265206405c2e8a63942c9366d70bd3eed3703..e2daa336f45b4410a032e8d091e9607477e7c093 100644 (file)
@@ -2,6 +2,7 @@
 #include <cstring>
 
 #include "parser.h"
+#include "tariffs.h"
 
 const int pt_mega = 1024 * 1024;
 //-----------------------------------------------------------------------------
@@ -179,7 +180,7 @@ void PARSER_ADD_TARIFF::CreateAnswer()
 //answerList->clear();
 answerList->erase(answerList->begin(), answerList->end());
 
-if (tariffs->Add(tariffToAdd, currAdmin) == 0)
+if (tariffs->Add(tariffToAdd, *currAdmin) == 0)
     {
     answerList->push_back("<AddTariff Result=\"Ok\"/>");
     }
@@ -227,7 +228,7 @@ if (users->TariffInUse(tariffToDel))
     return;
     }
 
-if (tariffs->Del(tariffToDel, currAdmin) == 0)
+if (tariffs->Del(tariffToDel, *currAdmin) == 0)
     {
     answerList->push_back("<DelTariff Result=\"Ok\"/>");
     }
@@ -474,7 +475,7 @@ answerList->erase(answerList->begin(), answerList->end());
 if (!td.tariffConf.name.data().empty())
     {
     TARIFF_DATA tariffData = td.GetData();
-    if (tariffs->Chg(tariffData, currAdmin) == 0)
+    if (tariffs->Chg(tariffData, *currAdmin) == 0)
         {
         answerList->push_back("<SetTariff Result=\"ok\"/>");
         return;