(app *App)
| 19 | var defaultPageUpdatedTime = time.Date(2018, 11, 8, 12, 0, 0, 0, time.Local) |
| 20 | |
| 21 | func getAboutPage(app *App) (*instanceContent, error) { |
| 22 | c, err := app.db.GetDynamicContent("about") |
| 23 | if err != nil { |
| 24 | return nil, err |
| 25 | } |
| 26 | if c == nil { |
| 27 | c = &instanceContent{ |
| 28 | ID: "about", |
| 29 | Type: "page", |
| 30 | Content: defaultAboutPage(app.cfg), |
| 31 | } |
| 32 | } |
| 33 | if !c.Title.Valid { |
| 34 | c.Title = defaultAboutTitle(app.cfg) |
| 35 | } |
| 36 | return c, nil |
| 37 | } |
| 38 | |
| 39 | func defaultAboutTitle(cfg *config.Config) sql.NullString { |
| 40 | return sql.NullString{String: "About " + cfg.App.SiteName, Valid: true} |
no test coverage detected