mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] Change API path
This commit is contained in:
parent
9203c22462
commit
c743e8209c
1 changed files with 4 additions and 4 deletions
|
@ -295,11 +295,11 @@ app = Sammy('#main', function (sam) {
|
||||||
// Check if te client is hosted on a yunohost node
|
// Check if te client is hosted on a yunohost node
|
||||||
domain = window.location.hostname
|
domain = window.location.hostname
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: 'https://'+ domain +'/ynhapi/api',
|
url: 'https://'+ domain +'/yunohost/api/api',
|
||||||
timeout: 3000
|
timeout: 3000
|
||||||
})
|
})
|
||||||
.success(function() {
|
.success(function() {
|
||||||
$.getJSON('https://'+ domain +'/ynhapi/installed', function(data) {
|
$.getJSON('https://'+ domain +'/yunohost/api/installed', function(data) {
|
||||||
if (!data.installed) {
|
if (!data.installed) {
|
||||||
c.redirect('#/postinstall');
|
c.redirect('#/postinstall');
|
||||||
} else {
|
} else {
|
||||||
|
@ -313,7 +313,7 @@ app = Sammy('#main', function (sam) {
|
||||||
});
|
});
|
||||||
|
|
||||||
sam.post('#/login', function (c) {
|
sam.post('#/login', function (c) {
|
||||||
store.set('url', 'https://'+ c.params['domain'] +'/ynhapi');
|
store.set('url', 'https://'+ c.params['domain'] +'/yunohost/api');
|
||||||
store.set('user', 'admin');
|
store.set('user', 'admin');
|
||||||
store.set('password', btoa(c.params['password']));
|
store.set('password', btoa(c.params['password']));
|
||||||
c.api('/api', function(data) {
|
c.api('/api', function(data) {
|
||||||
|
@ -365,7 +365,7 @@ app = Sammy('#main', function (sam) {
|
||||||
|
|
||||||
params['password'] = c.params['password']
|
params['password'] = c.params['password']
|
||||||
|
|
||||||
store.set('url', 'https://'+ window.location.hostname +'/ynhapi');
|
store.set('url', 'https://'+ window.location.hostname +'/yunohost/api');
|
||||||
store.set('user', 'admin');
|
store.set('user', 'admin');
|
||||||
store.set('password', btoa('yunohost'));
|
store.set('password', btoa('yunohost'));
|
||||||
c.api('/postinstall', function(data) { // http://api.yunohost.org/#!/tools/tools_postinstall_post_0
|
c.api('/postinstall', function(data) { // http://api.yunohost.org/#!/tools/tools_postinstall_post_0
|
||||||
|
|
Loading…
Add table
Reference in a new issue