Update extra page content API (#240)

* Mark change stream key api as pre-release

* Add API for changing extra page content. Renanme usercontent -> pagecontent. closes #236
This commit is contained in:
Gabe Kangas
2020-10-14 09:38:48 -07:00
committed by GitHub
parent d7c3991b59
commit 64a85e68aa
5 changed files with 84 additions and 10 deletions

View File

@@ -36,7 +36,7 @@ type InstanceDetails struct {
SocialHandles []socialHandle `yaml:"socialHandles" json:"socialHandles"`
Version string `json:"version"`
NSFW bool `yaml:"nsfw" json:"nsfw"`
ExtraUserContent string `json:"extraUserContent"`
ExtraPageContent string `json:"extraPageContent"`
}
type logo struct {
@@ -122,7 +122,7 @@ func (c *config) load(filePath string) error {
customContentMarkdownData, err := ioutil.ReadFile(ExtraInfoFile)
if err == nil {
customContentMarkdownString := string(customContentMarkdownData)
c.InstanceDetails.ExtraUserContent = utils.RenderSimpleMarkdown(customContentMarkdownString)
c.InstanceDetails.ExtraPageContent = utils.RenderSimpleMarkdown(customContentMarkdownString)
}
return nil