Fix broken api

This commit is contained in:
zandercymatics 2023-11-22 13:45:52 -07:00
parent c070651a8d
commit 7772a13834
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -95,14 +95,14 @@ def available(request, domain=""):
@login_not_required
def get_current_full(request):
# Open the CSV file
file_path = '../migrationdata/current-full.csv'
file_path = 'migrationdata/current-full.csv'
return serve_file(file_path)
@require_http_methods(["GET"])
@login_not_required
def get_current_federal(request):
# Open the CSV file
file_path = '../migrationdata/current-federal.csv'
file_path = 'migrationdata/current-federal.csv'
return serve_file(file_path)
def serve_file(file_path):