Skip to content

Commit

Permalink
[app][fix] hotfix header dict
Browse files Browse the repository at this point in the history
  • Loading branch information
M3ssman committed Oct 16, 2024
1 parent cf74530 commit 3dde01f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "digiflow"
version = "5.4.7"
version = "5.4.8"
description = "Father's Little Digitization Workflow Helper"
readme = "README.md"
requires-python = ">=3.8"
Expand Down
8 changes: 3 additions & 5 deletions src/digiflow/record/record_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
import digiflow.record as df_r


_MIME_TXT = "text/plain"
_MIME_JSON = "application/json"
DEFAULT_HEADER = {
"Content-Type": _MIME_JSON
"Content-Type": "application/json"
}
TEXT_HEADER = {
"Content-Type": _MIME_TXT
"Content-Type": "text/plain"
}
DEFAULT_COMMAND_NEXT = 'next'
DEFAULT_COMMAND_UPDATE = 'update'
Expand Down Expand Up @@ -121,7 +119,7 @@ def do_GET(self):
state, data = self.get_next_record(file_name, client_name,
get_record_state, set_record_state)
if isinstance(data, str):
self._respond(state, _MIME_TXT)
self._respond(state, headers=TEXT_HEADER)
self.wfile.write(data.encode('utf-8'))
else:
self._respond(state)
Expand Down

0 comments on commit 3dde01f

Please sign in to comment.