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

Move gacha files to separate directory and refactor file serving #892

Merged
1 commit merged into from May 15, 2022
Merged

Move gacha files to separate directory and refactor file serving #892

1 commit merged into from May 15, 2022

Conversation

ghost
Copy link

@ghost ghost commented May 14, 2022

Description

  • Move gacha related files to separate directory
  • Do not cache template HTML, allow for on-the-fly editing and updating without restarting server
  • Check if account exists before trying to query player in gachaDetails
  • Send proper HTTP codes when account/player/template not found
  • Fix broken argument order for getGachaRecords
  • Properly handle files as UTF-8
  • Fix language mapping (record was completely broken since it was using en instead of en-us, while details was using improper casing [we seem to save locale as en-US in database but generated mappings are casted to lowercase])

Issues fixed by this PR

N/A

Type of changes

  • Bug fix
  • New feature
  • Enhancement
  • Documentation

Checklist:

  • My code follows the style guidelines of this project
  • My pull request is unique and no other pull requests have been opened for these changes
  • I have read the Contributing note and Code of conduct
  • I am responsible for any copyright issues with my code if it occurs in the future.

@ghost ghost merged commit 213d288 into Grasscutters:development May 15, 2022
@mingjun97
Copy link
Contributor

Fix language mapping (record was completely broken since it was using en instead of en-us, while details was using improper casing [we seem to save locale as en-US in database but generated mappings are casted to lowercase])

The en-us is given by certain anime game client actually. The when the in-game webview try to access web pages, it will give GET parameters like lang=[ISO639 language code]. The original implement was tyring to let the user decide which language they want to see.

@ghost
Copy link
Author

ghost commented May 15, 2022

The en-us is given by certain anime game client actually. The when the in-game webview try to access web pages, it will give GET parameters like lang=[ISO639 language code].

Was simply en for me :>

This pull request was closed.
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.

None yet

1 participant