This commit is contained in:
Timothy Jaeryang Baek committed 2024-11-16 17:49:13 -08:00
1 parent af0ba53715
commit a1ce8422fd
9 files changed
+67 -69

No files matched your search

@@ -61,6 +61,7 @@ class PromptForm(BaseModel):
command: str
title: str
content: str
access_control: Optional[dict] = None
class PromptsTable:
@@ -124,6 +125,7 @@ class PromptsTable:
prompt = db.query(Prompt).filter_by(command=command).first()
prompt.title = form_data.title
prompt.content = form_data.content
prompt.access_control = form_data.access_control
prompt.timestamp = int(time.time())
db.commit()
return PromptModel.model_validate(prompt)