fix: Get site contents to use new dir

This commit is contained in:
Nathan Woodburn 2024-02-23 14:59:35 +11:00
parent 7ab3cfb54e
commit e322b8bbe7
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -114,7 +114,10 @@ def enable(name, enable):
return False return False
def get_content(site): def get_content(site):
path = f'uploads/{site}' site = get_site(site)
id = site['id']
path = f'/var/www/{id}'
if not os.path.isdir(path): if not os.path.isdir(path):
return [] return []
files = os.listdir(path) files = os.listdir(path)