Skip to content

Commit 83fa4f2

Browse files
committed
update to accept uppercase as the old poster did
1 parent 192af1c commit 83fa4f2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ ENV NAME=World
2626
# Run app.py when the container launches
2727
CMD ["fastapi", "run", "app.py"]
2828

29-
#harbor.freshbrewed.science/library/pybsposter:0.1.0
29+
#harbor.freshbrewed.science/library/pybsposter:0.1.1

app.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ class SocialPost(BaseModel):
1414
text: str
1515
link: str | None = None
1616

17+
class Config:
18+
allow_population_by_field_name = True
19+
alias_generator = lambda s: s.upper()
20+
populate_by_name = True
21+
1722
@app.get("/", response_class=HTMLResponse)
1823
def read_root():
1924
try:

0 commit comments

Comments
 (0)