changes suggested

nc-nginx-test
elena 2023-02-27 09:29:48 +00:00 committed by Evilham
parent 944505ab72
commit 0888c2ba05
2 changed files with 8 additions and 7 deletions

9
dd-ctl
View File

@ -327,7 +327,6 @@ down(){
setup_nextcloud(){
echo " --> Applying custom settings in nextcloud"
cp "$CUSTOM_PATH/custom/avatars/dd" "$DATA_FOLDER/avatars/master-avatars/"
# docker exec -u www-data dd-apps-nextcloud-app sh -c 'export OC_PASS=$DDADMIN_PASSWORD && php occ user:add --password-from-env --display-name="DD Admin" --group="admin" $DDADMIN_USER'
# docker exec -u www-data dd-apps-nextcloud-app sh -c 'export OC_PASS=admin && php occ user:delete admin'
@ -997,11 +996,11 @@ case "$OPERATION" in
update_logos_and_menu
;;
customize)
#up
#wait_for_moodle
up
wait_for_moodle
setup_nextcloud
#setup_wordpress
#setup_moodle
setup_wordpress
setup_moodle
;;
down)
down

View File

@ -49,11 +49,13 @@ def setup_avatar_views(app: "ApiFlaskApp") -> None:
# TODO: check if this is redundant and remove it
@app.route("/avatar/<username>", methods=["GET"])
def avatar(username: str) -> Response:
file = 'dd'
file = 'dd.jpg'
filepath = '/custom/avatars/'
if username != 'admin':
file = avatars.get_user_avatar(username)
filepath = os.path.join("", "../avatars/master-avatars/")
return send_from_directory(
os.path.join(app.root_path, "../avatars/master-avatars/"),
filepath,
file,
mimetype="image/jpg",
)