[fix] Redirect to app list when custom app installation fails.

This commit is contained in:
opi 2014-10-03 10:29:21 +02:00
parent 5c36905d9a
commit 2426123eab

View file

@ -812,6 +812,12 @@ app = Sammy('#main', function (sam) {
});
});
// Special case for custom app installation.
sam.get('#/apps/install/custom', function (c) {
// If we try to GET /apps/install/custom, it means that installation fail.
// Need to redirect to apps/install to get rid of pacamn and see the log.
c.redirect('#/apps/install');
});
sam.get('#/apps/install/:app', function (c) {
c.api('/apps?raw', function(data) { // http://api.yunohost.org/#!/app/app_list_get_8
appData = data[c.params['app']];