Use InstanceInfo.description field for HTML content
Also added description_source field for storing Markdown source.
This commit is contained in:
parent
bf92cebe5c
commit
7b69dc9219
2 changed files with 7 additions and 5 deletions
|
@ -1350,7 +1350,10 @@ components:
|
|||
description: A short description defined by the admin.
|
||||
type: string
|
||||
description:
|
||||
description: Admin-defined description of the site.
|
||||
description: Admin-defined description of the site (HTML).
|
||||
type: string
|
||||
description_source:
|
||||
description: Admin-defined description of the site (Markdown source).
|
||||
type: string
|
||||
version:
|
||||
description: Mastodon API compatibility version and the version of Mitra server.
|
||||
|
|
|
@ -33,9 +33,8 @@ pub struct InstanceInfo {
|
|||
uri: String,
|
||||
title: String,
|
||||
short_description: String,
|
||||
// TODO: HTML by default
|
||||
description: String,
|
||||
description_html: String,
|
||||
description_source: String,
|
||||
version: String,
|
||||
registrations: bool,
|
||||
stats: InstanceStats,
|
||||
|
@ -108,8 +107,8 @@ impl InstanceInfo {
|
|||
uri: config.instance().hostname(),
|
||||
title: config.instance_title.clone(),
|
||||
short_description: config.instance_short_description.clone(),
|
||||
description: config.instance_description.clone(),
|
||||
description_html: markdown_to_html(&config.instance_description),
|
||||
description: markdown_to_html(&config.instance_description),
|
||||
description_source: config.instance_description.clone(),
|
||||
version: get_full_api_version(&config.version),
|
||||
registrations: config.registrations_open,
|
||||
stats: InstanceStats {
|
||||
|
|
Loading…
Reference in a new issue