Remove references to get_token
This commit is contained in:
parent
7f0e83ddad
commit
68d3925798
1 changed files with 1 additions and 6 deletions
|
|
@ -4,7 +4,6 @@
|
||||||
:dev="dev_mode"
|
:dev="dev_mode"
|
||||||
:preview="preview_mode"
|
:preview="preview_mode"
|
||||||
:auth_redirect="auth_redirect"
|
:auth_redirect="auth_redirect"
|
||||||
:token="get_token()"
|
|
||||||
:data_exists="data.length !== 0"
|
:data_exists="data.length !== 0"
|
||||||
:is_track_data="config.type === 'Tracks'"
|
:is_track_data="config.type === 'Tracks'"
|
||||||
@playlist_export="playlist_export_modal = true"
|
@playlist_export="playlist_export_modal = true"
|
||||||
|
|
@ -68,10 +67,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
get_token() {
|
|
||||||
let params = new URLSearchParams(window.location.hash.slice(1));
|
|
||||||
return params.get(`access_token`);
|
|
||||||
},
|
|
||||||
get_data(config) {
|
get_data(config) {
|
||||||
let url = `${this.api_url}/me/top/${config.type.toLowerCase()}`;
|
let url = `${this.api_url}/me/top/${config.type.toLowerCase()}`;
|
||||||
|
|
||||||
|
|
@ -81,7 +76,7 @@ export default {
|
||||||
|
|
||||||
axios.get(
|
axios.get(
|
||||||
url,
|
url,
|
||||||
{ headers: { Authorization: `Bearer ${this.get_token()}` } }
|
{ headers: { Authorization: `Bearer ${this.api_token}` } }
|
||||||
).then((response) => {
|
).then((response) => {
|
||||||
this.error = ``;
|
this.error = ``;
|
||||||
this.config = config;
|
this.config = config;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue