File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def chat_list_messages(session: Session = Depends(get_session)):
2222

2323
# HTTP POST -> payload = {"message": "Hello world"} -> {"message": "hello world", "id": 1}
2424
# curl -X POST -d '{"message": "Hello world"}' -H "Content-Type: application/json" http://localhost:8080/api/chats/
25+
# curl -X POST -d '{"message": "Hello world"}' -H "Content-Type: application/json" https://docker-api-fastapi-python-app-3jid9.ondigitalocean.app/api/chats/
2526
@router.post("/", response_model=ChatMessageListItem)
2627
def chat_create_message(
2728
payload:ChatMessagePayload,
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
if DATABASE_URL == "":
99
raise NotImplementedError("`DATABASE_URL` needs to be set.")
1010

11+
DATABASE_URL = DATABASE_URL.replace("postgres://", "postgres+psycopg://")
1112

1213
engine = sqlmodel.create_engine(DATABASE_URL)
1314

0 commit comments

Comments
 (0)