From 1025f5b2bd0942e11de3b1ebfc2e4ec34d669439 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 30 Aug 2021 17:11:45 +0200 Subject: [PATCH] Fix --- conf/nginx.conf | 4 ++-- scripts/restore | 2 -- scripts/upgrade | 5 +++++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 1d6cd66..1ffdffd 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -41,7 +41,7 @@ location __PATH__/api { } } - location __PATH__/api/taskboard.db { - rewrite ^(.*)$ __PATH__/api/index.php last; break; +location __PATH__/api/taskboard.db { + rewrite ^(.*)$ __PATH__/api/index.php last; break; } \ No newline at end of file diff --git a/scripts/restore b/scripts/restore index b25c350..d8ed784 100644 --- a/scripts/restore +++ b/scripts/restore @@ -32,8 +32,6 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=1 -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " diff --git a/scripts/upgrade b/scripts/upgrade index 03e7730..f0a1834 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -45,6 +45,11 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi +# Create a permission if needed +if ! ynh_permission_exists --permission="api"; then + ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true" +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #=================================================