Test for exported theme

main
Bob Mottram 2021-05-28 22:46:42 +01:00
parent b168fde295
commit 74116db628
1 changed files with 11 additions and 12 deletions

View File

@ -4136,6 +4136,17 @@ class PubServer(BaseHTTPRequestHandler):
welcomeScreenIsComplete(self.server.baseDir, nickname,
self.server.domain)
onFinalWelcomeScreen = True
elif 'name="submitExportTheme"' in postBytesStr:
print('submitExportTheme')
themeDownloadPath = actorStr
if exportTheme(self.server.baseDir,
self.server.themeName):
themeDownloadPath += \
'/exports/' + self.server.themeName + '.zip'
self._redirect_headers(themeDownloadPath,
cookie, callingDomain)
self.server.POSTbusy = False
return
# extract all of the text fields into a dict
fields = \
@ -4148,18 +4159,6 @@ class PubServer(BaseHTTPRequestHandler):
print('WARN: profile update, no text ' +
'fields could be extracted from POST')
if fields.get('submitExportTheme'):
print('submitExportTheme')
themeDownloadPath = actorStr
if exportTheme(self.server.baseDir,
self.server.themeName):
themeDownloadPath += \
'/exports/' + self.server.themeName + '.zip'
self._redirect_headers(themeDownloadPath,
cookie, callingDomain)
self.server.POSTbusy = False
return
# load the json for the actor for this user
actorFilename = \
baseDir + '/accounts/' + \