mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] Guess API's baseurl is store is empty.
This commit is contained in:
parent
d9f4904cc6
commit
83127a5692
1 changed files with 6 additions and 1 deletions
|
@ -43,9 +43,14 @@
|
|||
},
|
||||
|
||||
checkInstall: function(callback) {
|
||||
// Get base url from store or guess from current url
|
||||
var baseUrl = (store.get('url') !== null) ? store.get('url')
|
||||
: window.location.hostname + '/yunohost/api';
|
||||
|
||||
// Call API endpoint
|
||||
$.ajax({
|
||||
dataType: "json",
|
||||
url: 'https://'+ store.get('url') +'/installed',
|
||||
url: 'https://'+ baseUrl +'/installed',
|
||||
timeout: 3000
|
||||
})
|
||||
.success(function(data) {
|
||||
|
|
Loading…
Reference in a new issue