(app *App)
| 171 | } |
| 172 | |
| 173 | func getReaderSection(app *App) (*instanceContent, error) { |
| 174 | c, err := app.db.GetDynamicContent("reader") |
| 175 | if err != nil { |
| 176 | return nil, err |
| 177 | } |
| 178 | if c == nil { |
| 179 | c = &instanceContent{ |
| 180 | ID: "reader", |
| 181 | Type: "section", |
| 182 | Content: defaultReaderBanner(app.cfg), |
| 183 | Updated: defaultPageUpdatedTime, |
| 184 | } |
| 185 | } |
| 186 | if !c.Title.Valid { |
| 187 | c.Title = defaultReaderTitle(app.cfg) |
| 188 | } |
| 189 | return c, nil |
| 190 | } |
| 191 | |
| 192 | func defaultReaderTitle(cfg *config.Config) sql.NullString { |
| 193 | return sql.NullString{String: "Reader", Valid: true} |
no test coverage detected