mirror of
https://github.com/mue/mue.git
synced 2026-07-17 22:14:13 +02:00
chore: update api urls
This commit is contained in:
@@ -148,10 +148,10 @@ export default class Background extends React.PureComponent {
|
||||
let requestURL, data;
|
||||
switch (backgroundAPI) {
|
||||
case 'unsplash':
|
||||
requestURL = `${window.constants.UNSPLASH_URL}/images/random?quality=${apiQuality}`;
|
||||
requestURL = `${window.constants.PROXY_URL}/images/unsplash?quality=${apiQuality}`;
|
||||
break;
|
||||
case 'pexels':
|
||||
requestURL = `${window.constants.PEXELS_URL}/images/random?quality=${apiQuality}`;
|
||||
requestURL = `${window.constants.PROXY_URL}/images/pexels?quality=${apiQuality}`;
|
||||
break;
|
||||
// Defaults to Mue
|
||||
default:
|
||||
|
||||
@@ -64,7 +64,7 @@ export default class Weather extends React.PureComponent {
|
||||
const tempFormat = localStorage.getItem('tempformat');
|
||||
|
||||
if (!this.state.weather.temp) {
|
||||
data = await (await fetch(window.constants.WEATHER_URL + `/current?city=${this.state.location}&lang=${localStorage.getItem('language')}&format=${tempFormat}`)).json();
|
||||
data = await (await fetch(window.constants.PROXY_URL + `/weather/current?city=${this.state.location}&lang=${localStorage.getItem('language')}&format=${tempFormat}`)).json();
|
||||
}
|
||||
|
||||
if (data.cod === '404') {
|
||||
|
||||
Reference in New Issue
Block a user