File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111@router .get ("/prospects" )
1212def root () -> dict :
1313 """GET /prospects endpoint."""
14- meta = make_meta ("success" , "Prospects start " )
14+ meta = make_meta ("success" , "Prospects endpoint " )
1515 data = [
1616 {"init" : f"{ base_url } /prospects/init" },
17- {"search" : f"{ base_url } /prospects/search/?query=example " },
17+ {"search" : f"{ base_url } /prospects/search/?query=karen " },
1818 ]
1919 return {"meta" : meta , "data" : data }
2020
@@ -189,6 +189,7 @@ def slugify(text):
189189 "list" : sub_departments
190190 }
191191 },
192+ "message" : "This is a placeholder for prospects/init."
192193 }
193194 return {"meta" : meta , "data" : data }
194195
Original file line number Diff line number Diff line change @@ -13,23 +13,15 @@ def root() -> dict:
1313 base_url = os .getenv ("BASE_URL" , "http://localhost:8000" )
1414 epoch = int (time .time () * 1000 )
1515 meta = {
16- "title" : "How can I help? " ,
16+ "title" : "NX-AI " ,
1717 "severity" : "success" ,
1818 "version" : __version__ ,
1919 "endpoint" : base_url ,
2020 "time" : epoch ,
2121 }
2222 endpoints = [
23+ {"name" : "docs" , "url" : f"{ base_url } /docs" },
2324 {"name" : "health" , "url" : f"{ base_url } /health" },
2425 {"name" : "prospects" , "url" : f"{ base_url } /prospects" },
25- # {
26- # "name": "products",
27- # "url": f"{base_url}/products",
28- # "children": [
29- # {"name": "seed", "url": f"{base_url}/products/seed"},
30- # {"name": "update", "url": f"{base_url}/products/update"}
31- # ]
32- # },
33- {"name" : "docs" , "url" : f"{ base_url } /docs" },
3426 ]
3527 return {"meta" : meta , "data" : endpoints }
Original file line number Diff line number Diff line change 1818 allow_origins = [
1919 "http://localhost:1999" ,
2020 "https://goldlabel.pro" ,
21- "https://soho.goldlabel.pro" ,
22- "https://echopay.goldlabel.pro" ,
21+ "https://free.goldlabel.pro" ,
2322 ],
2423 allow_credentials = True ,
2524 allow_methods = ["*" ],
Original file line number Diff line number Diff line change @@ -11,5 +11,8 @@ def make_meta(severity: str, title: str) -> dict:
1111 "title" : title ,
1212 "version" : __version__ ,
1313 "endpoint" : f"{ base_url } /prospects" ,
14+ "base" : base_url ,
15+ "base_url" : base_url ,
16+ "message" : title ,
1417 "time" : epoch ,
1518 }
Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ def test_make_meta_basic(monkeypatch):
1313 assert meta ["severity" ] == "info"
1414 assert meta ["title" ] == "Test Title"
1515 assert meta ["version" ] == __version__
16- assert meta ["base_url " ] == "http://testserver:9000"
16+ assert meta ["base " ] == "http://testserver:9000"
1717 assert before <= meta ["time" ] <= after
1818
1919def test_make_meta_default_base_url (monkeypatch ):
2020 monkeypatch .delenv ("BASE_URL" , raising = False )
2121 meta = make_meta ("success" , "Default URL" )
22- assert meta ["base_url " ] == "http://localhost:8000"
22+ assert meta ["base " ] == "http://localhost:8000"
2323
2424def test_make_meta_time_is_int ():
2525 meta = make_meta ("info" , "Time Test" )
You can’t perform that action at this time.
0 commit comments