X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/641204dfbdb9fc870cdd2e7f9e3169a44693e7bf..e3bd9717d35cb33018fb7589e1dfc7751d193b33:/projects/stargazer/plugins/configuration/rpcconfig/tariffs_methods.cpp?ds=sidebyside diff --git a/projects/stargazer/plugins/configuration/rpcconfig/tariffs_methods.cpp b/projects/stargazer/plugins/configuration/rpcconfig/tariffs_methods.cpp index 36194e36..0b110d54 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/tariffs_methods.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/tariffs_methods.cpp @@ -1,6 +1,10 @@ -#include "rpcconfig.h" #include "tariffs_methods.h" +#include "rpcconfig.h" #include "tariff_helper.h" +#include "stg/tariffs.h" +#include "stg/users.h" +#include "stg/admins.h" +#include "stg/admin.h" void METHOD_TARIFF_GET::execute(xmlrpc_c::paramList const & paramList, xmlrpc_c::value * const retvalPtr) @@ -28,9 +32,7 @@ if (!tariff) return; } -TARIFF_DATA td; - -tariff->GetTariffData(&td); +TARIFF_DATA td(tariff->GetTariffData()); TARIFF_HELPER helper(td); @@ -53,9 +55,9 @@ if (config->GetAdminInfo(cookie, &adminInfo)) return; } -ADMIN admin; +ADMIN * admin; -if (admins->FindAdmin(adminInfo.admin, &admin)) +if (admins->Find(adminInfo.admin, &admin)) { *retvalPtr = xmlrpc_c::value_boolean(false); return; @@ -69,9 +71,7 @@ if (!tariff) return; } -TARIFF_DATA td; - -tariff->GetTariffData(&td); +TARIFF_DATA td(tariff->GetTariffData()); TARIFF_HELPER helper(td); @@ -136,9 +136,9 @@ if (config->GetAdminInfo(cookie, &adminInfo)) return; } -ADMIN admin; +ADMIN * admin; -if (admins->FindAdmin(adminInfo.admin, &admin)) +if (admins->Find(adminInfo.admin, &admin)) { *retvalPtr = xmlrpc_c::value_boolean(false); return; @@ -168,9 +168,9 @@ if (config->GetAdminInfo(cookie, &adminInfo)) return; } -ADMIN admin; +ADMIN * admin; -if (admins->FindAdmin(adminInfo.admin, &admin)) +if (admins->Find(adminInfo.admin, &admin)) { *retvalPtr = xmlrpc_c::value_boolean(false); return;