From 66324c3f0eda8d7cb0a9a5523066012b782a015c Mon Sep 17 00:00:00 2001 From: Mark Beamer Jr Date: Sat, 20 Oct 2018 12:04:26 -0400 Subject: [PATCH] adjusting deprecated APIs --- lib/thirdparty/LBRY.class.php | 8 ++++---- web/js/emailSettings.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/thirdparty/LBRY.class.php b/lib/thirdparty/LBRY.class.php index 2b9a5a3c..a6223d24 100644 --- a/lib/thirdparty/LBRY.class.php +++ b/lib/thirdparty/LBRY.class.php @@ -31,23 +31,23 @@ class LBRY public static function editEmailSettings($token, $email, $isPrimary =null, $isEnabled = null) { - return Curl::post(static::getApiUrl('/user/email/edit'), ['auth_token' => $token], ['email' => $email], ['is_primary' => $isPrimary], ['is_enabled' => $isEnabled]); + return Curl::post(static::getApiUrl('/user_email/edit'), ['auth_token' => $token], ['email' => $email], ['is_primary' => $isPrimary], ['is_enabled' => $isEnabled]); } public static function emailStatus($token) { - list($status, $headers, $body) = Curl::doCurl(Curl::POST, static::getApiUrl('/user/email/status'),['auth_token' => $token], ['json_response' => true]); + list($status, $headers, $body) = Curl::doCurl(Curl::POST, static::getApiUrl('/user_email/status'), ['auth_token' => $token], ['json_response' => true]); return array($status,$headers,$body); } public static function applyTags($type, $token, $tags) { - return Curl::post(static::getApiUrl('/user/tag/edit'), ['auth_token' => $token], [$type => $tags]); + return Curl::post(static::getApiUrl('/user_tag/edit'), ['auth_token' => $token], [$type => $tags]); } public static function unsubscribe($email) { - return Curl::post(static::getApiUrl('/list/unsubscribe'), ['email' => $email], ['json_response' => true]); + return Curl::post(static::getApiUrl('/user/unsubscribe'), ['email' => $email], ['json_response' => true]); } public static function connectYoutube($channel_name) diff --git a/web/js/emailSettings.js b/web/js/emailSettings.js index 1f836948..19e7aa8d 100644 --- a/web/js/emailSettings.js +++ b/web/js/emailSettings.js @@ -14,7 +14,7 @@ lbry.emailSettingsForm = function (formSelector, tags, userAuthToken) { function submitEmail(e) { var element = e.target, - url = 'https://api.lbry.io/user/email/edit?auth_token=' + userAuthToken + url = 'https://api.lbry.io/user_email/edit?auth_token=' + userAuthToken + "&email=" + element.value + "&enabled=" + element.checked.toString(); emailSection.find('.notice').hide(); @@ -30,7 +30,7 @@ lbry.emailSettingsForm = function (formSelector, tags, userAuthToken) { function submitTags() { tagSection.find('.notice').hide(); - var url = 'https://api.lbry.io/user/tag/edit?auth_token=' + userAuthToken, + var url = 'https://api.lbry.io/user_tag/edit?auth_token=' + userAuthToken, addTags = [], removeTags = [];