diff --git a/wrenchboard/src/include/account.h b/wrenchboard/src/include/account.h index bf71ca22..97ab49df 100644 --- a/wrenchboard/src/include/account.h +++ b/wrenchboard/src/include/account.h @@ -9,6 +9,8 @@ long account_calls(CVars in, CVars &out); long LoginWrenchBoardFamilyLogin(CVars in, CVars &out); long WrenchBoardCreateFamilyAcc(CVars in, CVars &out); +long LoginWrenchPromoAccount( CVars in, CVars &out ); + long LoginWrenchBoardAccount( CVars in, CVars &out ); long LoginWrenchBoardSetDashType(CVars in, CVars &out); long LoginWrenchBoardFacebook( CVars in, CVars &out ); diff --git a/wrenchboard/src/include/wrenchboard_api.h b/wrenchboard/src/include/wrenchboard_api.h index e83a53f2..91d6542c 100644 --- a/wrenchboard/src/include/wrenchboard_api.h +++ b/wrenchboard/src/include/wrenchboard_api.h @@ -206,6 +206,7 @@ enum { PARTNER_STRIPE }; #define WRENCHBOARD_ACCOUNT_CREATEACC 11020 #define WRENCHBOARD_ACCOUNT_QRLOGIN 11022 +#define WRENCHBOARD_PROMO_LOGIN 11023 #define WRENCHBOARD_ACCOUNT_AUXLOGIN 11024 #define WRENCHBOARD_ACCOUNT_LOGIN 11025 #define WRENCHBOARD_FACEBOOK_LOGIN 11026 diff --git a/wrenchboard/src/shared_tool/account.cc b/wrenchboard/src/shared_tool/account.cc index 03a1fde2..7626f354 100644 --- a/wrenchboard/src/shared_tool/account.cc +++ b/wrenchboard/src/shared_tool/account.cc @@ -223,6 +223,10 @@ long account_calls(CVars in, CVars &out) { return LoginWrenchBoardAccount(in, out); break; + case WRENCHBOARD_PROMO_LOGIN: + return LoginWrenchPromoAccount( in, out ); + break; + case WRENCHBOARD_ACCOUNT_AUXLOGIN: return LoginWrenchBoardAuxAccount(in, out); break; @@ -2472,6 +2476,14 @@ long WrenchTestWalletCapability(CVars in, CVars &out){ } return 0; } + +long LoginWrenchPromoAccount( CVars in, CVars &out ){ + long ret = PHP_API_BAD_PARAM; + logfmt(logINFO, "LoginWrenchPromoAccount()"); + + return 0; +} + long LoginWrenchBoardAccount(CVars in, CVars &out) { long ret = PHP_API_BAD_PARAM; logfmt(logINFO, "LoginWrenchBoardAccount()"); diff --git a/www-api/app/Config/Constants.php b/www-api/app/Config/Constants.php index 87c155c6..c917258e 100644 --- a/www-api/app/Config/Constants.php +++ b/www-api/app/Config/Constants.php @@ -206,6 +206,7 @@ const LOGIN_APPLE = 990012; define('WRENCHBOARD_ACCOUNT_DASHRECENT', 11206); define('WRENCHBOARD_ACCOUNT_QRLOGIN', 11022); +const WRENCHBOARD_PROMO_LOGIN = 11023; define('WRENCHBOARD_ACCOUNT_CREATEACC', 11020); define('WRENCHBOARD_ACCOUNT_AUXSTART', 11023); define('WRENCHBOARD_ACCOUNT_AUXLOGIN', 11024); diff --git a/www-api/app/Controllers/WrenchAuth.php b/www-api/app/Controllers/WrenchAuth.php index c1a134a9..54f275b6 100644 --- a/www-api/app/Controllers/WrenchAuth.php +++ b/www-api/app/Controllers/WrenchAuth.php @@ -13,7 +13,20 @@ class WrenchAuth extends BaseController $raw_json = file_get_contents('php://input'); $in = json_decode($raw_json, true); $out=[]; + $in["action"] = WRENCHBOARD_PROMO_LOGIN; + $ret = $this->wrenchboard->wrenchboard_api($in, $out); + $out['internal_return'] = $ret; + log_message('critical', "***** ***** WrenchAuth::userLogin Ret = ".$ret ); + if ( $out['internal_return'] == 100 ){ + $endpoint = "USER_SESSION-". str_pad($out["member_id"], 12, "0", STR_PAD_LEFT) ."-"; + log_message('critical', "***** ***** WrenchAuth::userLogin USER_SESSION = ".$endpoint ); + $this->saveCache($endpoint,$out,15000); + }else + { + // log_message('critical', "***** ***** WrenchAuth::userLogin USER_SESSION = ".$fail_endpoint ); + // $this->saveCache($fail_endpoint,$outF,15000); + } return $this->respond( $this->summaryReturnData($in,$out), 200); } public function userLogin(){