kopia lustrzana https://github.com/bugout-dev/moonstream
rodzic
13b8e3bfe7
commit
f5708135da
|
@ -11,10 +11,6 @@ class SubscriptionTypeResourceData(BaseModel):
|
||||||
name: str
|
name: str
|
||||||
description: str
|
description: str
|
||||||
icon_url: str
|
icon_url: str
|
||||||
# fields is expected to be of the form:
|
|
||||||
# {"<field_name>": "<field_type>"}
|
|
||||||
# Here, <field_type> can be one of: str, number, bool.
|
|
||||||
fields: Dict[str, str] = Field(default_factory=dict)
|
|
||||||
stripe_product_id: Optional[str] = None
|
stripe_product_id: Optional[str] = None
|
||||||
stripe_price_id: Optional[str] = None
|
stripe_price_id: Optional[str] = None
|
||||||
active: bool = False
|
active: bool = False
|
||||||
|
|
|
@ -12,7 +12,7 @@ from moonstreamdb import db
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
|
|
||||||
from ..stream_processors import ethereum_blockchain
|
from ..providers import ethereum_blockchain
|
||||||
from .. import data
|
from .. import data
|
||||||
from ..middleware import BroodAuthMiddleware
|
from ..middleware import BroodAuthMiddleware
|
||||||
from ..settings import (
|
from ..settings import (
|
||||||
|
|
|
@ -235,7 +235,7 @@ async def list_subscription_types() -> data.SubscriptionTypesListResponse:
|
||||||
try:
|
try:
|
||||||
response = subscription_types.list_subscription_types()
|
response = subscription_types.list_subscription_types()
|
||||||
results = [
|
results = [
|
||||||
data.SubscriptionTypeResourceData.validate(resource.resource_data).dict()
|
data.SubscriptionTypeResourceData.validate(resource.resource_data)
|
||||||
for resource in response.resources
|
for resource in response.resources
|
||||||
]
|
]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Ładowanie…
Reference in New Issue