Skip to content

Commit

Permalink
remove unused (and broken) api routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Highfire1 committed Dec 4, 2024
1 parent ffb5beb commit c165c72
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions api.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,41 +74,41 @@ async def executives_all() -> list[LCSCExecutive]:
response = FileResponse(path)
return response

@app.get(
"/executives/active",
summary="Returns a list of all non-retired LCSC executives.",
)
async def executives_active() -> list[LCSCExecutive]:
path = f"{DATA_DIRECTORY}/json/execs_export.json"
# @app.get(
# "/executives/active",
# summary="Returns a list of all non-retired LCSC executives.",
# )
# async def executives_active() -> list[LCSCExecutive]:
# path = f"{DATA_DIRECTORY}/json/execs_export.json"

with open(path, "r") as fi:
data = json.loads(fi.read())
# with open(path, "r") as fi:
# data = json.loads(fi.read())

new_arr = []
# new_arr = []

for e in data:
if e["current_status"] != "Retired":
new_arr.append(e)
# for e in data:
# if e["current_status"] != "Retired":
# new_arr.append(e)

return new_arr

@app.get(
"/executives/retired",
summary="Returns a list of all retired LCSC executives.",
)
async def executives_retired() -> list[LCSCExecutive]:
path = f"{DATA_DIRECTORY}/json/execs_export.json"
# return new_arr

# @app.get(
# "/executives/retired",
# summary="Returns a list of all retired LCSC executives.",
# )
# async def executives_retired() -> list[LCSCExecutive]:
# path = f"{DATA_DIRECTORY}/json/execs_export.json"

with open(path, "r") as fi:
data = json.loads(fi.read())
# with open(path, "r") as fi:
# data = json.loads(fi.read())

new_arr = []
# new_arr = []

for e in data:
if e["current_status"] == "Retired":
new_arr.append(e)
# for e in data:
# if e["current_status"] == "Retired":
# new_arr.append(e)

return new_arr
# return new_arr

@app.get(
"/executives/images/{filename}",
Expand Down

0 comments on commit c165c72

Please sign in to comment.