API - init privacy policy
This commit is contained in:
@@ -25,6 +25,9 @@ class AppConfig(BaseModel):
|
||||
)
|
||||
max_zip_file_size = db.Column(db.Integer, default=10485760, nullable=False)
|
||||
admin_contact = db.Column(db.String(255), nullable=True)
|
||||
privacy_policy_date = db.Column(db.DateTime, nullable=True)
|
||||
privacy_policy = db.Column(db.Text, nullable=True)
|
||||
about = db.Column(db.Text, nullable=True)
|
||||
|
||||
@property
|
||||
def is_registration_enabled(self) -> bool:
|
||||
@@ -46,6 +49,7 @@ class AppConfig(BaseModel):
|
||||
def serialize(self) -> Dict:
|
||||
weather_provider = os.getenv('WEATHER_API_PROVIDER', '').lower()
|
||||
return {
|
||||
'about': self.about,
|
||||
'admin_contact': self.admin_contact,
|
||||
'gpx_limit_import': self.gpx_limit_import,
|
||||
'is_email_sending_enabled': current_app.config['CAN_SEND_EMAILS'],
|
||||
@@ -54,6 +58,8 @@ class AppConfig(BaseModel):
|
||||
'max_zip_file_size': self.max_zip_file_size,
|
||||
'max_users': self.max_users,
|
||||
'map_attribution': self.map_attribution,
|
||||
'privacy_policy': self.privacy_policy,
|
||||
'privacy_policy_date': self.privacy_policy_date,
|
||||
'version': VERSION,
|
||||
'weather_provider': (
|
||||
weather_provider
|
||||
|
||||
Reference in New Issue
Block a user