MCPcopy Index your code
hub / github.com/writefreely/writefreely / getReaderSection

Function getReaderSection

pages.go:173–190  ·  view source on GitHub ↗
(app *App)

Source from the content-addressed store, hash-verified

171}
172
173func 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
192func defaultReaderTitle(cfg *config.Config) sql.NullString {
193 return sql.NullString{String: "Reader", Valid: true}

Callers 2

handleViewAdminPageFunction · 0.85
showLocalTimelineFunction · 0.85

Calls 3

defaultReaderBannerFunction · 0.85
defaultReaderTitleFunction · 0.85
GetDynamicContentMethod · 0.65

Tested by

no test coverage detected