forked from jmug/stoatchat
feat: add legal links to root payload (#733)
Signed-off-by: ispik <ispik@ispik.dev>
This commit is contained in:
@@ -57,6 +57,8 @@ pub struct RevoltFeatures {
|
||||
pub livekit: VoiceFeature,
|
||||
/// Limits
|
||||
pub limits: LimitsConfig,
|
||||
/// Legal links
|
||||
pub legal_links: LegalLinks,
|
||||
}
|
||||
|
||||
/// # Limits For Users
|
||||
@@ -70,6 +72,17 @@ pub struct LimitsConfig {
|
||||
pub default: UserLimits,
|
||||
}
|
||||
|
||||
/// # Legal links
|
||||
#[derive(Serialize, JsonSchema, Debug)]
|
||||
pub struct LegalLinks {
|
||||
/// Terms of Service URL
|
||||
pub terms_of_service: String,
|
||||
/// Privacy Policy URL
|
||||
pub privacy_policy: String,
|
||||
/// Guidelines URL
|
||||
pub guidelines: String,
|
||||
}
|
||||
|
||||
/// # Global limits
|
||||
#[derive(Serialize, JsonSchema, Debug)]
|
||||
pub struct GlobalLimits {
|
||||
@@ -238,6 +251,11 @@ pub async fn root() -> Result<Json<RevoltConfig>> {
|
||||
new_user: UserLimits::from_feature_limits(config.features.limits.new_user),
|
||||
default: UserLimits::from_feature_limits(config.features.limits.default),
|
||||
},
|
||||
legal_links: LegalLinks {
|
||||
terms_of_service: config.features.legal_links.terms_of_service,
|
||||
privacy_policy: config.features.legal_links.privacy_policy,
|
||||
guidelines: config.features.legal_links.guidelines,
|
||||
},
|
||||
},
|
||||
ws: config.hosts.events,
|
||||
app: config.hosts.app,
|
||||
|
||||
Reference in New Issue
Block a user