@@ -18,10 +18,10 @@ def loadEnds(app):
18
18
app .add_route ("/identifiers/{name}/exchanges" , exnColEnd )
19
19
20
20
exnColEnd = ExchangeQueryCollectionEnd ()
21
- app .add_route ("/identifiers/{name}/ exchanges/query" , exnColEnd )
21
+ app .add_route ("/exchanges/query" , exnColEnd )
22
22
23
23
exnResEnd = ExchangeResourceEnd ()
24
- app .add_route ("/identifiers/{name}/ exchanges/{said}" , exnResEnd )
24
+ app .add_route ("/exchanges/{said}" , exnResEnd )
25
25
26
26
27
27
class ExchangeCollectionEnd :
@@ -83,19 +83,15 @@ def on_post(req, rep, name):
83
83
class ExchangeQueryCollectionEnd :
84
84
85
85
@staticmethod
86
- def on_post (req , rep , name ):
86
+ def on_post (req , rep ):
87
87
""" POST endpoint for exchange message collection
88
88
89
89
Args:
90
90
req (Request): falcon HTTP request object
91
91
rep (Response): falcon HTTP response object
92
- name (str): human readable alias for AID context
93
92
94
93
"""
95
94
agent = req .context .agent
96
- hab = agent .hby .habByName (name )
97
- if hab is None :
98
- raise falcon .HTTPNotFound (description = "name is not a valid reference to an identifier" )
99
95
100
96
try :
101
97
body = req .get_media ()
@@ -141,23 +137,16 @@ class ExchangeResourceEnd:
141
137
""" Exchange message resource endpoint class """
142
138
143
139
@staticmethod
144
- def on_get (req , rep , name , said ):
140
+ def on_get (req , rep , said ):
145
141
"""GET endpoint for exchange message collection
146
142
147
143
Args:
148
144
req (Request): falcon HTTP request object
149
145
rep (Response): falcon HTTP response object
150
- name (str): human readable alias for AID context
151
146
said (str): qb64 SAID of exchange message to retrieve
152
147
153
148
"""
154
149
agent = req .context .agent
155
-
156
- # Get the hab
157
- hab = agent .hby .habByName (name )
158
- if hab is None :
159
- raise falcon .HTTPNotFound (description = f"alias={ name } is not a valid reference to an identifier" )
160
-
161
150
serder , pathed = exchanging .cloneMessage (agent .hby , said )
162
151
163
152
if serder is None :
0 commit comments