Skip to content

Fix:When you create a new API module named xxxa_api, the access route will become xxx instead of xxxa. For example, when I create a new API module named 'data_api', the access route will become 'dat' instead of 'data #7325

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

donblack01
Copy link
Contributor

@donblack01 donblack01 commented Apr 25, 2025

What problem does this PR solve?

Fix:When you create a new API module named xxxa_api, the access route will become xxx instead of xxxa. For example, when I create a new API module named 'data_api', the access route will become 'dat' instead of 'data'
Fix:Fixed the issue where the new knowledge base would not be renamed when there was a knowledge base with the same name

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

… will become xxx instead of xxxa. For example, when I create a new API module named 'data_api', the access route will become 'dat' instead of 'data'

Fix:Fixed the issue where the new knowledge base would not be renamed when there was a knowledge base with the same name
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. labels Apr 25, 2025
@@ -107,7 +107,10 @@ def search_pages_path(pages_dir):
def register_page(page_path):
path = f"{page_path}"

page_name = page_path.stem.rstrip("_app")
page_name = page_path.stem
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
page_name = page_path.stem
page_name = page_path.stem.removesuffix("_app")

@KevinHuSh KevinHuSh added the ci Continue Integration label May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants