(email: str, message="")
| 4 | |
| 5 | |
| 6 | def write_notification(email: str, message=""): |
| 7 | with open("log.txt", mode="w") as email_file: |
| 8 | content = f"notification for {email}: {message}" |
| 9 | email_file.write(content) |
| 10 | |
| 11 | |
| 12 | @app.post("/send-notification/{email}") |