Skip to content

Commit 5be69f7

Browse files
committed
refactor: update knowledge base endpoint paths
1 parent 79efc66 commit 5be69f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/datapilot/core/knowledge/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def do_GET(self):
2222
path = urlparse(self.path).path
2323

2424
# Match /knowledge_bases/{uuid} pattern
25-
match = re.match(r"^/knowledge_bases/([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})$", path)
25+
match = re.match(r"^/kb/([a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12})$", path)
2626

2727
if match:
2828
public_id = match.group(1)
@@ -34,7 +34,7 @@ def do_GET(self):
3434

3535
def handle_knowledge_base(self, public_id):
3636
"""Fetch and return knowledge base data."""
37-
url = f"{self.backend_url}/knowledge_bases/public/{public_id}"
37+
url = f"{self.backend_url}/knowledge_bases/private/{public_id}"
3838

3939
# Validate URL scheme for security
4040
parsed_url = urlparse(url)

0 commit comments

Comments
 (0)