diff --git a/.env.example b/.env.example index 2d0fc7b..a7c0656 100644 --- a/.env.example +++ b/.env.example @@ -1,8 +1,7 @@ -# APP_PATH="/proxitok" # Relative path, PLEASE LEAVE EMPTY IF / +# APP_URL="http://localhost:8000" # Absolute path to proxitok instance # LATTE_CACHE=/tmp/proxitok_api # Path for Latte cache, leave commented for ./cache/latte # API CONFIG -# API_FORCE_LEGACY=true # Force legacy mode for wrapper # API_SIGNER_URL="https://example.com" # External signing service # API_BROWSER_URL="http://localhost:4444" # chromedriver url # API_TEST_ENDPOINTS=true # Discomment for usage of testing TikTok endpoints, may help sometimes diff --git a/app/Controllers/SettingsController.php b/app/Controllers/SettingsController.php index a7dc8d6..0d6294d 100644 --- a/app/Controllers/SettingsController.php +++ b/app/Controllers/SettingsController.php @@ -25,10 +25,7 @@ class SettingsController { self::redirect(); } static public function api() { - if (isset($_POST['api-legacy'])) { - $legacy = $_POST['api-legacy']; - } - Cookies::set('api-legacy', $legacy); + // TODO, ADD COUNT self::redirect(); } } diff --git a/app/Controllers/TrendingController.php b/app/Controllers/TrendingController.php index d514781..587b330 100644 --- a/app/Controllers/TrendingController.php +++ b/app/Controllers/TrendingController.php @@ -10,13 +10,8 @@ use App\Models\RSSTemplate; class TrendingController { static public function get() { $api = Wrappers::api(); + $cursor = Misc::getTtwid(); - // Ttwid if standard, cursor if legacy - if ($api->isLegacy()) { - $cursor = Misc::getCursor(); - } else { - $cursor = Misc::getTtwid(); - } $trending = $api->trending(); $trending->feed($cursor); diff --git a/app/Helpers/Wrappers.php b/app/Helpers/Wrappers.php index 5d4d816..8022c70 100644 --- a/app/Helpers/Wrappers.php +++ b/app/Helpers/Wrappers.php @@ -81,8 +81,6 @@ class Wrappers { } } - // Legacy mode - $legacy = Misc::env('API_FORCE_LEGACY', false) || isset($_COOKIE['api-legacy']) && $_COOKIE['api-legacy'] === 'on'; - return new \TikScraper\Api($options, $legacy, $cacheEngine); + return new \TikScraper\Api($options, $cacheEngine); } } diff --git a/components/settings/api.latte b/components/settings/api.latte index 142a1ec..7d02d2b 100644 --- a/components/settings/api.latte +++ b/components/settings/api.latte @@ -1,14 +1,7 @@ {embed '../form.latte', path: '/settings/api', method: 'POST', submit: true} {block fields}
TODO
About this instance
Version: {version()}
-Forcing Legacy mode: {isset($_ENV['API_FORCE_LEGACY']) ? 'yes' : 'no'}
Why would I want to use ProxiTok?