Now you can have multiple themes

This commit is contained in:
ben
2022-11-24 14:54:19 +00:00
committed by dni ⚡
parent b2e8bed24c
commit 700196a5a9
10 changed files with 305 additions and 95 deletions

View File

@@ -14,6 +14,7 @@ class CreateCharge(BaseModel):
webhook: str = Query(None)
completelink: str = Query(None)
completelinktext: str = Query(None)
custom_css: Optional[str]
time: int = Query(..., ge=1)
amount: int = Query(..., ge=1)
extra: str = "{}"
@@ -38,6 +39,7 @@ class Charges(BaseModel):
completelink: Optional[str]
completelinktext: Optional[str] = "Back to Merchant"
extra: str = "{}"
custom_css: Optional[str]
time: int
amount: int
balance: int
@@ -73,9 +75,12 @@ class Charges(BaseModel):
def must_call_webhook(self):
return self.webhook and self.paid and self.config.webhook_success == False
class SatsPaySettings(BaseModel):
class SatsPayThemes(BaseModel):
css_id: str = Query(None)
title: str = Query(None)
custom_css: str = Query(None)
user: Optional[str]
@classmethod
def from_row(cls, row: Row) -> "SatsPaySettings":
def from_row(cls, row: Row) -> "SatsPayThemes":
return cls(**dict(row))