(app *App)
| 63 | } |
| 64 | |
| 65 | func getPrivacyPage(app *App) (*instanceContent, error) { |
| 66 | c, err := app.db.GetDynamicContent("privacy") |
| 67 | if err != nil { |
| 68 | return nil, err |
| 69 | } |
| 70 | if c == nil { |
| 71 | c = &instanceContent{ |
| 72 | ID: "privacy", |
| 73 | Type: "page", |
| 74 | Content: defaultPrivacyPolicy(app.cfg), |
| 75 | Updated: defaultPageUpdatedTime, |
| 76 | } |
| 77 | } |
| 78 | if !c.Title.Valid { |
| 79 | c.Title = defaultPrivacyTitle() |
| 80 | } |
| 81 | return c, nil |
| 82 | } |
| 83 | |
| 84 | func defaultPrivacyTitle() sql.NullString { |
| 85 | return sql.NullString{String: "Privacy Policy", Valid: true} |
no test coverage detected