mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Handle parameters with mixin.
This commit is contained in:
parent
3b0f1a7678
commit
d76781847b
1 changed files with 3 additions and 5 deletions
|
@ -34,11 +34,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
async fetchTrending(region) {
|
||||
let url = Constants.BASE_URL + "/trending";
|
||||
if (region) {
|
||||
url += "?region=" + region;
|
||||
}
|
||||
return await this.fetchJson(url);
|
||||
return await this.fetchJson(Constants.BASE_URL + "/trending", {
|
||||
region: region || "US",
|
||||
});
|
||||
},
|
||||
},
|
||||
components: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue