mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Uninstall route
This commit is contained in:
parent
ad72b0063c
commit
98030ecc9f
1 changed files with 11 additions and 0 deletions
11
js/app.js
11
js/app.js
|
@ -452,6 +452,17 @@ app = Sammy('#main', function (sam) {
|
|||
}, 'POST', params);
|
||||
});
|
||||
|
||||
sam.get('#/apps/:app/uninstall', function (c) {
|
||||
if (confirm('Are you sure you want to uninstall '+ c.params['app'] +' ?')) {
|
||||
c.api('/app', function() { // http://api.yunohost.org/#!/user/user_delete_delete_4
|
||||
c.redirect('#/apps');
|
||||
}, 'DELETE', { 'app': c.params['app'] } );
|
||||
} else {
|
||||
store.clear('slide');
|
||||
c.redirect('#/apps/'+ c.params['app']);
|
||||
}
|
||||
});
|
||||
|
||||
sam.get('#/apps/refresh', function (c) {
|
||||
c.api('/app/lists', function(data) { // http://api.yunohost.org/#!/app/app_fetchlist_put_5
|
||||
c.redirect(store.get('path'));
|
||||
|
|
Loading…
Reference in a new issue