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.
|
description: A short description defined by the admin.
|
||||||
type: string
|
type: string
|
||||||
description:
|
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
|
type: string
|
||||||
version:
|
version:
|
||||||
description: Mastodon API compatibility version and the version of Mitra server.
|
description: Mastodon API compatibility version and the version of Mitra server.
|
||||||
|
|
|
@ -33,9 +33,8 @@ pub struct InstanceInfo {
|
||||||
uri: String,
|
uri: String,
|
||||||
title: String,
|
title: String,
|
||||||
short_description: String,
|
short_description: String,
|
||||||
// TODO: HTML by default
|
|
||||||
description: String,
|
description: String,
|
||||||
description_html: String,
|
description_source: String,
|
||||||
version: String,
|
version: String,
|
||||||
registrations: bool,
|
registrations: bool,
|
||||||
stats: InstanceStats,
|
stats: InstanceStats,
|
||||||
|
@ -108,8 +107,8 @@ impl InstanceInfo {
|
||||||
uri: config.instance().hostname(),
|
uri: config.instance().hostname(),
|
||||||
title: config.instance_title.clone(),
|
title: config.instance_title.clone(),
|
||||||
short_description: config.instance_short_description.clone(),
|
short_description: config.instance_short_description.clone(),
|
||||||
description: config.instance_description.clone(),
|
description: markdown_to_html(&config.instance_description),
|
||||||
description_html: markdown_to_html(&config.instance_description),
|
description_source: config.instance_description.clone(),
|
||||||
version: get_full_api_version(&config.version),
|
version: get_full_api_version(&config.version),
|
||||||
registrations: config.registrations_open,
|
registrations: config.registrations_open,
|
||||||
stats: InstanceStats {
|
stats: InstanceStats {
|
||||||
|
|
Loading…
Reference in a new issue