feat: use objects for contact field

This commit is contained in:
Ushie 2023-08-20 00:06:52 +03:00
parent ffdb976f2c
commit 5922830e0b
No known key found for this signature in database
GPG Key ID: B3AAD18842E34632
2 changed files with 11 additions and 5 deletions

View File

@ -2,15 +2,21 @@ from api.models.donations import DonationFields
from api.models.socials import SocialFields
from pydantic import BaseModel
class ContactFields(BaseModel):
"""
Implements the fields for the API owner contact info.
"""
email: str
class InfoFields(BaseModel):
"""
Implements the fields for a API owner info.
Implements the fields for the API owner info.
"""
name: str
about: str
contact: dict[str, str]
contact: ContactFields
socials: list[SocialFields]
donations: DonationFields

View File

@ -116,9 +116,9 @@ links: list[dict[str, str | bool]] = [
default_info: dict[str, str | list[str | bool] | bool] = {
"name": owner,
"about": "ReVanced was born out of Vanced's discontinuation and it is our goal to continue the legacy of what Vanced left behind. Thanks to ReVanced Patcher, it's possible to create long-lasting patches for nearly any Android app. ReVanced's patching system is designed to allow patches to work on new versions of the apps automatically with bare minimum maintenance.",
"contact": [
{"method": "mail", "value": "contact@revanced.app"},
],
"contact": {
"email": "contact@revanced.app"
},
"socials": social_links,
"donations": {"wallets": wallets, "links": links},
}