Skip to content

Commit

Permalink
Everything should now be working on the new api format. Added some ab…
Browse files Browse the repository at this point in the history
…ility to add Organizations and products.
  • Loading branch information
Nathaniel-Reeves committed Jul 9, 2024
1 parent 3b64417 commit 4ac3cfc
Show file tree
Hide file tree
Showing 29 changed files with 1,354 additions and 1,175 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ app/db/files/*
app/redis/data/*
app/.env
specs
app/api/main/controller/prod_server_db_creds.md
28 changes: 28 additions & 0 deletions app/api/main/controller/execute.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from view.response import error_message
from model.connector import get_session

def execute_query(custom_response, stm):
raw_data = []

# Connect to the database
try:
session = get_session()
except Exception:
error = error_message()
custom_response.insert_flash_message(error)
custom_response.set_status_code(500)
return custom_response, raw_data, False

# Execute the query
try:
stream = session.execute(stm)
raw_data = stream.all()
except Exception:
error = error_message()
custom_response.insert_flash_message(error)
custom_response.set_status_code(400)
session.close()
return custom_response, raw_data, False

session.close()
return custom_response, raw_data, True
240 changes: 0 additions & 240 deletions app/api/main/controller/files.py

This file was deleted.

Loading

0 comments on commit 4ac3cfc

Please sign in to comment.