main
Bob Mottram 2020-10-10 23:19:58 +01:00
parent 2f8b6052e7
commit 51a05ef180
1 changed files with 5 additions and 3 deletions

View File

@ -3021,6 +3021,9 @@ class PubServer(BaseHTTPRequestHandler):
if fields.get('editedNewsPost'): if fields.get('editedNewsPost'):
newsPostContent = fields['editedNewsPost'] newsPostContent = fields['editedNewsPost']
print('TEST newsPostUrl ' + str(newsPostUrl))
print('TEST newsPostTitle ' + str(newsPostTitle))
print('TEST newsPostUrl ' + str(newsPostUrl))
if newsPostUrl and newsPostContent and newsPostTitle: if newsPostUrl and newsPostContent and newsPostTitle:
# load the post # load the post
postFilename = \ postFilename = \
@ -3033,13 +3036,12 @@ class PubServer(BaseHTTPRequestHandler):
newsPostTitle newsPostTitle
postJsonObject['object']['content'] = \ postJsonObject['object']['content'] = \
newsPostContent newsPostContent
postUrl = postJsonObject['object']['id']
postUrl = postUrl.replace('/', '#')
# remove the html from post cache # remove the html from post cache
cachedPost = \ cachedPost = \
baseDir + '/accounts/' + \ baseDir + '/accounts/' + \
nickname + '@' + domain + \ nickname + '@' + domain + \
'/postcache/' + postUrl + '.html' '/postcache/' + newsPostUrl + '.html'
print('TEST cachedPost ' + cachedPost)
if os.path.isfile(cachedPost): if os.path.isfile(cachedPost):
os.remove(cachedPost) os.remove(cachedPost)
# save the news post # save the news post