Skip to content

Commit 78521a7

Browse files
committed
no intentional 404 responses
1 parent e90ca96 commit 78521a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

surftimer/ck_playertemp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ async def selectPlayerTmp(
171171
if xquery:
172172
xquery = xquery.pop()
173173
else:
174-
return JSONResponse(
175-
status_code=status.HTTP_404_NOT_FOUND, content=json.loads(cached_data)
176-
)
174+
response.headers['content-type'] = 'application/json'
175+
response.status_code = status.HTTP_204_NO_CONTENT
176+
return response
177177

178178
# Cache the data in Redis
179179
set_cache(cache_key, xquery)

0 commit comments

Comments
 (0)