Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix active char account endpoint #264

Merged
merged 2 commits into from
Aug 11, 2023
Merged

Fix active char account endpoint #264

merged 2 commits into from
Aug 11, 2023

Conversation

slassen
Copy link
Collaborator

@slassen slassen commented Aug 6, 2023

I discovered this bug when working on the tools section. In the "Who's online" does a query to /api/v1/misc/active which has a formula for how many active character in the last 14 days. If there is an error or there is no active characters in the last 14 days it was supposed to send to the client an error. However, the function was returning the string to the simple cache setter. Because the return set the cache and not response to the client the server crashes since we are setting the header again when we send the cache.

We never see this on production or the test server because we always have someone who has logged on in the last 14 days. To fix this I just have it return a string of 0 to the cache.

@slassen slassen merged commit 40b4e53 into develop Aug 11, 2023
4 checks passed
@slassen slassen deleted the fix-active-query branch August 11, 2023 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant