Open ifndefJOSH opened 1 year ago
Create a POST endpoint at /report that accepts form or JSON data and inserts into the reports table into the database.
POST
/report
reports
cursor.execute(f"insert into reports blah1, blah2 values ({blah1}, {blah2})") # BAD (SQL injection danger)!!! cursor.execute("insert into reports blah1, blah2 values (?, ?)", (blah1, blah2,)) # GOOD (Sqlite sanitizes these inputs)
Create a
POST
endpoint at/report
that accepts form or JSON data and inserts into thereports
table into the database.