u.twoha.cc/app.py

12 lines
288 B
Python
Raw Permalink Normal View History

2024-09-13 03:24:53 -04:00
from flask import Flask, request, redirect, make_response
import json
2024-10-15 21:55:50 -04:00
import time
2024-09-13 03:24:53 -04:00
app = Flask(__name__)
2024-09-19 22:17:42 -04:00
@app.post('/_/message')
2024-09-13 03:24:53 -04:00
def message():
with open('message.txt', 'a') as f:
2024-10-15 21:55:50 -04:00
f.write(json.dumps(request.form | {'time': int(time.time())}))
2024-09-19 22:17:42 -04:00
return redirect('/contact')