Skip to content

Commit

Permalink
fix: story to delete the chatbot created
Browse files Browse the repository at this point in the history
  • Loading branch information
yashbonde committed Jun 12, 2023
1 parent 5ef06af commit b668d90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/api/chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def delete_chatbot(
return {"message": "ChatBot not found"}
chatbot.deleted_at = datetime.now()
db.commit()
return {"msg": "ChatBot deleted successfully"}
return {"msg": f"ChatBot '{chatbot.id}' deleted successfully"}


# L: GET /chatbot/
Expand Down
2 changes: 1 addition & 1 deletion server/stories/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def story(self, name: str):
# fmt: off
hr("Create chatbot"); out = self.init(name); print("New chatbot:", out)
hr("List chatbots"); chatbots = self.list()["chatbots"]; print("total chatbots:", len(chatbots))
hr("Show chatbot"); out = self.show(chatbots[0]["id"]); print("chatbot:", out)
hr("Show chatbot"); out = self.show(out["id"]); print("chatbot:", out)
hr("Update chatbot"); out = self.update(out["id"], name="new name"); print("updated chatbot:", out)
hr("Delete chatbot"); out = self.delete(out["id"]); print("deleted chatbot:", out)
hr("List chatbots"); out = self.list(); print("total chatbots:", len(out))
Expand Down

0 comments on commit b668d90

Please sign in to comment.