mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[fix] Prevent empty params when installing custom apps.
This commit is contained in:
parent
424cd812d5
commit
974e8774fb
1 changed files with 5 additions and 3 deletions
|
@ -1139,13 +1139,15 @@ app = Sammy('#main', function (sam) {
|
|||
|
||||
// Install custom app from github
|
||||
sam.post('#/apps/install/custom', function(c) {
|
||||
|
||||
params = { 'label': c.params['label'], 'app': c.params['url'] }
|
||||
delete c.params['label'];
|
||||
delete c.params['url'];
|
||||
|
||||
c.confirm(
|
||||
y18n.t('applications'),
|
||||
y18n.t('confirm_install_custom_app'),
|
||||
function(){
|
||||
params = { 'label': c.params['label'], 'app': c.params['url'] }
|
||||
delete c.params['label'];
|
||||
delete c.params['url'];
|
||||
|
||||
// Force trailing slash
|
||||
params.app = params.app.replace(/\/?$/, '/');
|
||||
|
|
Loading…
Add table
Reference in a new issue