|
|
|
@ -40,7 +40,7 @@ async def new_message(event): |
|
|
|
|
|
|
|
|
|
entry += '\n\n{}\n\n'.format(data['message']) |
|
|
|
|
|
|
|
|
|
with open('data/html/index.html', 'a') as f: |
|
|
|
|
with open('data/g/index.html', 'a') as f: |
|
|
|
|
f.write(entry) |
|
|
|
|
|
|
|
|
|
await event.reply('Entry added to t0.vc/g') |
|
|
|
@ -60,6 +60,9 @@ async def submit(request): |
|
|
|
|
except KeyError: |
|
|
|
|
raise web.HTTPBadRequest(reason='You are missing something.') |
|
|
|
|
|
|
|
|
|
if not len(name) or not len(message): |
|
|
|
|
raise web.HTTPBadRequest(reason='You are missing something.') |
|
|
|
|
|
|
|
|
|
if len(name) > 50: |
|
|
|
|
raise web.HTTPBadRequest(reason='Name is too long.') |
|
|
|
|
if len(website) > 100: |
|
|
|
|