1
0
Эх сурвалжийг харах

#4148 Build-in API support: removing test messages and tests redirects

Alex Trofimov 3 жил өмнө
parent
commit
9fd22fd54d

+ 2 - 4
template/scripts/BxBaseServiceAccount.php

@@ -54,8 +54,7 @@ class BxBaseServiceAccount extends BxDol
             }
             }
             else
             else
                 return [
                 return [
-                    bx_api_get_msg('You are already joined 🐵! Redirecting...'),
-                    ['id' => 2, 'type' => 'redirect', 'data' => ['uri' => '/posts-home', 'timeout' => 3000]],
+                    ['id' => 2, 'type' => 'redirect', 'data' => ['uri' => '/']],
                 ];
                 ];
         }
         }
 
 
@@ -69,9 +68,8 @@ class BxBaseServiceAccount extends BxDol
                 ])];
                 ])];
             else if($mixedResult === true)
             else if($mixedResult === true)
                 return [
                 return [
-                    bx_api_get_block('redirect', ['uri' => '/posts-home', 'timeout' => 1000]),
+                    bx_api_get_block('redirect', ['uri' => '/']),
                     bx_api_get_block('login', ['session' => BxDolSession::getInstance()->getId()], ['id' => 2]),
                     bx_api_get_block('login', ['session' => BxDolSession::getInstance()->getId()], ['id' => 2]),
-                    bx_api_get_msg('Join Success 👍! Redirecting...', ['id' => 3]),
                 ];
                 ];
             else
             else
                 return bx_api_get_msg($mixedResult);
                 return bx_api_get_msg($mixedResult);

+ 2 - 3
template/scripts/BxBaseServiceLogin.php

@@ -153,8 +153,7 @@ class BxBaseServiceLogin extends BxDol
             } 
             } 
             else {
             else {
                 return [
                 return [
-                    bx_api_get_msg('You are already logged in 🐵! Redirecting...'),
-                    ['id' => 2, 'type' => 'redirect', 'data' => ['uri' => '/posts-home', 'timeout' => 3000]],
+                    ['id' => 2, 'type' => 'redirect', 'data' => ['uri' => '/']],
                 ];
                 ];
             }
             }
         }
         }
@@ -330,7 +329,7 @@ class BxBaseServiceLogin extends BxDol
 
 
         if (bx_is_api()) {
         if (bx_is_api()) {
             return [
             return [
-                ['id' => 2, 'type' => 'redirect', 'data' => ['uri' => '/posts-home']],
+                ['id' => 2, 'type' => 'redirect', 'data' => ['uri' => '/']],
             ];
             ];
         }
         }
         else {
         else {