mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
fix xss
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user