Skip to content

Commit

Permalink
Autoformat api.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Yasamato committed Apr 12, 2021
1 parent 72ecdbe commit b9cc91a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions piracymoe/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def health():
""" Heartbeat used for uptime monitoring purposes. """
return "Ok"


@bp.route("/api/fetch/tables")
def fetch_tables():
""" Used by the frontend, returns a JSON list of all the tables including metadata. """
Expand Down Expand Up @@ -625,7 +626,7 @@ def update_table_entry(table):
after = request.get_json()

utils._send_webhook_message(user=app.discord.fetch_user(), operation="update",
table=table.name, before=before,
table=table.name, before=before,
after=after)

table.update(data, ["id"])
Expand All @@ -650,7 +651,7 @@ def insert_new_entry(table):

utils._send_webhook_message(user=app.discord.fetch_user(), operation="insert",
table=table.name, after=data)

table.insert(data)
return "inserted"

Expand All @@ -673,4 +674,4 @@ def delete_entry(table, id):
table=table.name, after=data)

table.delete(id=id)
return "deleted"
return "deleted"

0 comments on commit b9cc91a

Please sign in to comment.