Skip to content

Commit f51c878

Browse files
bugfix: fix CSV mime-type
1 parent 6f7aee4 commit f51c878

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mip_api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def lambda_handler(event, context):
105105

106106
# combine them into CSV output
107107
balances_csv = balances.format_csv(raw_bal, gl_chart)
108-
return util.build_return_text(200, balances_csv)
108+
return util.build_return_csv(200, balances_csv)
109109

110110
# common processing for '/accounts' and '/tags'
111111

mip_api/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ def build_return_json(code, body):
1515
}
1616

1717

18-
def build_return_text(code, body):
18+
def build_return_csv(code, body):
1919
return {
2020
"statusCode": code,
2121
"body": body,
22-
"headers": {"Content-Type": "test/csv"},
22+
"headers": {"Content-Type": "text/csv"},
2323
}
2424

2525

0 commit comments

Comments
 (0)