Skip to content

Commit

Permalink
Reverting back the recent <conversation_id>
Browse files Browse the repository at this point in the history
  • Loading branch information
alwx committed Nov 4, 2021
1 parent fd2f05e commit c68cdff
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions rasa/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ async def status(request: Request) -> HTTPResponse:
}
)

@app.get("/conversations/<conversation_id>/tracker")
@app.get("/conversations/<conversation_id:path>/tracker")
@requires_auth(app, auth_token)
@ensure_loaded_agent(app)
async def retrieve_tracker(request: Request, conversation_id: Text) -> HTTPResponse:
Expand All @@ -719,7 +719,7 @@ async def retrieve_tracker(request: Request, conversation_id: Text) -> HTTPRespo
f"An unexpected error occurred. Error: {e}",
)

@app.post("/conversations/<conversation_id>/tracker/events")
@app.post("/conversations/<conversation_id:path>/tracker/events")
@requires_auth(app, auth_token)
@ensure_loaded_agent(app)
async def append_events(request: Request, conversation_id: Text) -> HTTPResponse:
Expand Down Expand Up @@ -780,7 +780,7 @@ def _get_events_from_request_body(request: Request) -> List[Event]:

return events

@app.put("/conversations/<conversation_id>/tracker/events")
@app.put("/conversations/<conversation_id:path>/tracker/events")
@requires_auth(app, auth_token)
@ensure_loaded_agent(app)
async def replace_events(request: Request, conversation_id: Text) -> HTTPResponse:
Expand All @@ -807,7 +807,7 @@ async def replace_events(request: Request, conversation_id: Text) -> HTTPRespons
f"An unexpected error occurred. Error: {e}",
)

@app.get("/conversations/<conversation_id>/story")
@app.get("/conversations/<conversation_id:path>/story")
@requires_auth(app, auth_token)
@ensure_loaded_agent(app)
@ensure_conversation_exists()
Expand All @@ -834,7 +834,7 @@ async def retrieve_story(request: Request, conversation_id: Text) -> HTTPRespons
f"An unexpected error occurred. Error: {e}",
)

@app.post("/conversations/<conversation_id>/execute")
@app.post("/conversations/<conversation_id:path>/execute")
@requires_auth(app, auth_token)
@ensure_loaded_agent(app)
@ensure_conversation_exists()
Expand Down Expand Up @@ -889,7 +889,7 @@ async def execute_action(request: Request, conversation_id: Text) -> HTTPRespons

return response.json(response_body)

@app.post("/conversations/<conversation_id>/trigger_intent")
@app.post("/conversations/<conversation_id:path>/trigger_intent")
@requires_auth(app, auth_token)
@ensure_loaded_agent(app)
async def trigger_intent(request: Request, conversation_id: Text) -> HTTPResponse:
Expand Down Expand Up @@ -947,7 +947,7 @@ async def trigger_intent(request: Request, conversation_id: Text) -> HTTPRespons

return response.json(response_body)

@app.post("/conversations/<conversation_id>/predict")
@app.post("/conversations/<conversation_id:path>/predict")
@requires_auth(app, auth_token)
@ensure_loaded_agent(app)
@ensure_conversation_exists()
Expand All @@ -967,7 +967,7 @@ async def predict(request: Request, conversation_id: Text) -> HTTPResponse:
f"An unexpected error occurred. Error: {e}",
)

@app.post("/conversations/<conversation_id>/messages")
@app.post("/conversations/<conversation_id:path>/messages")
@requires_auth(app, auth_token)
@ensure_loaded_agent(app)
async def add_message(request: Request, conversation_id: Text) -> HTTPResponse:
Expand Down

0 comments on commit c68cdff

Please sign in to comment.