Skip to content

Commit

Permalink
Added profile image
Browse files Browse the repository at this point in the history
  • Loading branch information
arcbtc committed Jun 7, 2024
1 parent cc639a8 commit aa2f21f
Show file tree
Hide file tree
Showing 5 changed files with 303 additions and 120 deletions.
5 changes: 3 additions & 2 deletions crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,16 @@ async def create_participant(
participant_id = urlsafe_short_hash()
await db.execute(
"""
INSERT INTO raisenow.participants (id, wallet, name, raisenow, description, total)
VALUES (?, ?, ?, ?, ?, ?)
INSERT INTO raisenow.participants (id, wallet, name, raisenow, description, profile_image, total)
VALUES (?, ?, ?, ?, ?, ?, ?)
""",
(
participant_id,
wallet_id,
data.name,
data.raisenow,
data.description,
data.profile_image,
data.total,
),
)
Expand Down
1 change: 1 addition & 0 deletions migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ async def m002_initial(db):
raise TEXT NOT NULL,
name TEXT NOT NULL,
description TEXT,
profile_image TEXT,
total INTEGER DEFAULT 0,
lnurlpay TEXT
);
Expand Down
2 changes: 2 additions & 0 deletions models.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class CreateParticipantData(BaseModel):
name: str
raisenow: str
description: Optional[str]
profile_image: Optional[str]
total: Optional[int]


Expand All @@ -51,6 +52,7 @@ class Participant(BaseModel):
name: str
raisenow: str
description: Optional[str]
profile_image: Optional[str]
total: Optional[int]
lnurlpay: Optional[str]

Expand Down
Loading

0 comments on commit aa2f21f

Please sign in to comment.