mirror of https://gitlab.com/bashrc2/epicyon
Update edited about and tos
parent
c1e2e3ae5d
commit
d78139a258
23
daemon.py
23
daemon.py
|
@ -2891,10 +2891,13 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
return
|
return
|
||||||
|
|
||||||
linksFilename = baseDir + '/accounts/links.txt'
|
linksFilename = baseDir + '/accounts/links.txt'
|
||||||
|
aboutFilename = baseDir + '/accounts/about.txt'
|
||||||
|
TOSFilename = baseDir + '/accounts/tos.txt'
|
||||||
|
|
||||||
# extract all of the text fields into a dict
|
# extract all of the text fields into a dict
|
||||||
fields = \
|
fields = \
|
||||||
extractTextFieldsInPOST(postBytes, boundary, debug)
|
extractTextFieldsInPOST(postBytes, boundary, debug)
|
||||||
|
|
||||||
if fields.get('editedLinks'):
|
if fields.get('editedLinks'):
|
||||||
linksStr = fields['editedLinks']
|
linksStr = fields['editedLinks']
|
||||||
linksFile = open(linksFilename, "w+")
|
linksFile = open(linksFilename, "w+")
|
||||||
|
@ -2905,6 +2908,26 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if os.path.isfile(linksFilename):
|
if os.path.isfile(linksFilename):
|
||||||
os.remove(linksFilename)
|
os.remove(linksFilename)
|
||||||
|
|
||||||
|
if fields.get('editedAbout'):
|
||||||
|
aboutStr = fields['editedAbout']
|
||||||
|
aboutFile = open(aboutFilename, "w+")
|
||||||
|
if aboutFile:
|
||||||
|
aboutFile.write(aboutStr)
|
||||||
|
aboutFile.close()
|
||||||
|
else:
|
||||||
|
if os.path.isfile(aboutFilename):
|
||||||
|
os.remove(aboutFilename)
|
||||||
|
|
||||||
|
if fields.get('editedTOS'):
|
||||||
|
TOSStr = fields['editedTOS']
|
||||||
|
TOSFile = open(TOSFilename, "w+")
|
||||||
|
if TOSFile:
|
||||||
|
TOSFile.write(TOSStr)
|
||||||
|
TOSFile.close()
|
||||||
|
else:
|
||||||
|
if os.path.isfile(TOSFilename):
|
||||||
|
os.remove(TOSFilename)
|
||||||
|
|
||||||
# redirect back to the default timeline
|
# redirect back to the default timeline
|
||||||
if callingDomain.endswith('.onion') and \
|
if callingDomain.endswith('.onion') and \
|
||||||
onionDomain:
|
onionDomain:
|
||||||
|
|
Loading…
Reference in New Issue