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

Function getContactPage

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

Source from the content-addressed store, hash-verified

41}
42
43func getContactPage(app *App) (*instanceContent, error) {
44 c, err := app.db.GetDynamicContent("contact")
45 if err != nil {
46 return nil, err
47 }
48 if c == nil {
49 c = &instanceContent{
50 ID: "contact",
51 Type: "page",
52 Content: defaultContactPage(app),
53 }
54 }
55 if !c.Title.Valid {
56 c.Title = defaultContactTitle()
57 }
58 return c, nil
59}
60
61func defaultContactTitle() sql.NullString {
62 return sql.NullString{String: "Contact Us", Valid: true}

Callers 2

handleViewAdminPageFunction · 0.85
handleTemplatedPageFunction · 0.85

Calls 3

defaultContactPageFunction · 0.85
defaultContactTitleFunction · 0.85
GetDynamicContentMethod · 0.65

Tested by

no test coverage detected