(app *App)
| 41 | } |
| 42 | |
| 43 | func 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 | |
| 61 | func defaultContactTitle() sql.NullString { |
| 62 | return sql.NullString{String: "Contact Us", Valid: true} |
no test coverage detected