Rename getLandingPage -> getLandingBody

This makes the naming scheme more consistent with other funcs.

Ref T565
This commit is contained in:
Matt Baer 2019-06-27 22:22:21 -04:00
parent a72ce2ef29
commit c3f3eb0a65
3 changed files with 3 additions and 3 deletions

View file

@ -317,7 +317,7 @@ func handleViewAdminPage(app *App, u *User, w http.ResponseWriter, r *http.Reque
if err != nil { if err != nil {
return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not get banner: %v", err)} return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not get banner: %v", err)}
} }
p.Content, err = getLandingPage(app) p.Content, err = getLandingBody(app)
p.Content.ID = "landing" p.Content.ID = "landing"
} else { } else {
p.Content, err = app.db.GetDynamicContent(slug) p.Content, err = app.db.GetDynamicContent(slug)

2
app.go
View file

@ -219,7 +219,7 @@ func handleViewHome(app *App, w http.ResponseWriter, r *http.Request) error {
} }
p.Banner = template.HTML(applyMarkdown([]byte(banner.Content), "")) p.Banner = template.HTML(applyMarkdown([]byte(banner.Content), ""))
content, err := getLandingPage(app) content, err := getLandingBody(app)
if err != nil { if err != nil {
log.Error("unable to get landing content: %v", err) log.Error("unable to get landing content: %v", err)
return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not get content: %v", err)} return impart.HTTPError{http.StatusInternalServerError, fmt.Sprintf("Could not get content: %v", err)}

View file

@ -96,7 +96,7 @@ func getLandingBanner(app *App) (*instanceContent, error) {
return c, nil return c, nil
} }
func getLandingPage(app *App) (*instanceContent, error) { func getLandingBody(app *App) (*instanceContent, error) {
c, err := app.db.GetDynamicContent("landing-body") c, err := app.db.GetDynamicContent("landing-body")
if err != nil { if err != nil {
return nil, err return nil, err