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

Function getPrivacyPage

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

Source from the content-addressed store, hash-verified

63}
64
65func 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
84func defaultPrivacyTitle() sql.NullString {
85 return sql.NullString{String: "Privacy Policy", Valid: true}

Callers 2

handleViewAdminPageFunction · 0.85
handleTemplatedPageFunction · 0.85

Calls 3

defaultPrivacyPolicyFunction · 0.85
defaultPrivacyTitleFunction · 0.85
GetDynamicContentMethod · 0.65

Tested by

no test coverage detected