This commit is contained in:
Alex
2023-11-23 00:09:17 +00:00
parent d7a1be2f3c
commit 5bdedacab1
2 changed files with 7 additions and 5 deletions

View File

@@ -249,7 +249,6 @@ def create_prompt():
if name == "":
return {"status": "error"}
user = "local"
# write to mongodb
resp = prompts_collection.insert_one(
{
"name": name,
@@ -258,7 +257,7 @@ def create_prompt():
}
)
new_id = str(resp.inserted_id)
return {"id": new_id, "name": name, "content": content}
return {"id": new_id}
@user.route("/api/get_prompts", methods=["GET"])
def get_prompts():