mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-22 02:53:05 +00:00
Merge pull request #657 from WebTools-NG/ukdtom/issue656
[BUG] Using Usr/Pwd to logon gives an error
This commit is contained in:
commit
2c9323a15e
2 changed files with 12 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
|||
# ![Logo](https://github.com/WebTools-NG/WebTools-NG/blob/master/src/assets/WebTools-48x48.png) WebTools-ng Change log
|
||||
|
||||
## V1.2.1 ( NOT RELEASED YET )
|
||||
## V1.2.1 ( 20221206 )
|
||||
|
||||
**Note**: In this version, the following is disabled:
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
|||
* [#646 File Count on Download module page](https://github.com/WebTools-NG/WebTools-NG/issues/646) (Enhancement)
|
||||
* [#647 Download item selection](https://github.com/WebTools-NG/WebTools-NG/issues/647) (Enhancement)
|
||||
* [#650 Module order is out of order](https://github.com/WebTools-NG/WebTools-NG/issues/650) (Enhancement)
|
||||
* [#656 Using Usr/Pwd to logon gives an error](https://github.com/WebTools-NG/WebTools-NG/issues/656) (Enhancement)
|
||||
|
||||
## V1.2.0 ( 20221203 )
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ const actions = {
|
|||
},
|
||||
loginToPlex({ commit }, payload){
|
||||
log.info("[plextv.js] (loginToPlex) loginToPlex called")
|
||||
if (payload.token == ""){
|
||||
if (payload.token === ""){
|
||||
var url = `${wtutils.plexTVApi}v2/users/signin`;
|
||||
url = url + '?login=' + require('querystring').escape(payload.username);
|
||||
url = url + '&password=' + require('querystring').escape(payload.password);
|
||||
|
@ -105,13 +105,13 @@ const actions = {
|
|||
headers: wtutils.PMSHeader
|
||||
})
|
||||
.then(function (response) {
|
||||
log.debug('[plextv.js] (loginToPlex) loginToPlex: Response from fetchPlexServers recieved')
|
||||
commit('UPDATE_AUTHTOKEN', response.data.authToken)
|
||||
commit('UPDATE_AUTHENTICATED', true)
|
||||
commit('UPDATE_AVATAR', response.data.thumb)
|
||||
commit('UPDATE_PLEXNAME', response.data.username)
|
||||
commit('UPDATE_MeId', response.data.user.id);
|
||||
commit('UPDATE_Features', response.data.user.subscription.features);
|
||||
log.debug('[plextv.js] (loginToPlex) loginToPlex: Response from loginToPlex recieved');
|
||||
commit('UPDATE_AUTHTOKEN', response.data.authToken);
|
||||
commit('UPDATE_AUTHENTICATED', true);
|
||||
commit('UPDATE_AVATAR', response.data.thumb);
|
||||
commit('UPDATE_PLEXNAME', response.data.username);
|
||||
commit('UPDATE_MeId', response.data.id);
|
||||
commit('UPDATE_Features', response.data.subscription.features);
|
||||
router.replace({name: "home"});
|
||||
})
|
||||
.catch(function (error) {
|
||||
|
@ -119,7 +119,7 @@ const actions = {
|
|||
// The request was made and the server responded with a status code
|
||||
// that falls out of the range of 2xx
|
||||
log.error(`[plextv.js] (loginToPlex) status: ${error.response.status}`);
|
||||
log.error(`[plextv.js] (loginToPlex) data: ${JSON.stringify(error.response.data)}`);
|
||||
//log.error(`[plextv.js] (loginToPlex) data: ${JSON.stringify(error.response.data)}`);
|
||||
// alert(error.response.data.message)
|
||||
var data = JSON.stringify(error.response.data);
|
||||
var objectValue = JSON.parse(data);
|
||||
|
@ -157,7 +157,7 @@ const actions = {
|
|||
}
|
||||
},
|
||||
loginToPlexWithToken({ commit }, payload){
|
||||
log.info("[plextv.js] (loginToPlexWithToken) loginToPlex called, using a Token")
|
||||
log.info("[plextv.js] (loginToPlexWithToken) loginToPlex called, using a Token");
|
||||
let header = wtutils.PMSHeader;
|
||||
const url = 'https://plex.tv/users/sign_in.json?X-Plex-Token=' + payload.token;
|
||||
axios({
|
||||
|
|
Loading…
Reference in a new issue