Skip to content

Commit 17720ff

Browse files
committed
pass a model instead of a dict for compat pastes
1 parent 780c41d commit 17720ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mystbin/backend/routers/pastes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ async def compat_create_paste(request: Request):
386386
content = await request.body()
387387
paste: Record = await request.app.state.db.put_paste(
388388
paste_id=generate_paste_id(),
389-
pages=[{"filename": "file.txt", "content": content}],
389+
pages=[payloads.PasteFile(filename="file.txt", content=content.decode("utf8"))],
390390
origin_ip=request.headers.get("x-forwarded-for", request.client.host)
391391
if request.app.config["paste"]["log_ip"]
392392
else None

0 commit comments

Comments
 (0)