Monorepo for Tangled tangled.org

appview/pages: fix terms and privacy pages

Signed-off-by: oppiliappan <me@oppi.li>

oppi.li 129aea32 20ba1adb

verified
Changed files
+20 -6
appview
+17 -3
appview/pages/pages.go
··· 38 38 "github.com/go-git/go-git/v5/plumbing/object" 39 39 ) 40 40 41 - //go:embed templates/* static 41 + //go:embed templates/* static legal 42 42 var Files embed.FS 43 43 44 44 type Pages struct { ··· 242 242 func (p *Pages) TermsOfService(w io.Writer, params TermsOfServiceParams) error { 243 243 filename := "terms.md" 244 244 filePath := filepath.Join("legal", filename) 245 - markdownBytes, err := os.ReadFile(filePath) 245 + 246 + file, err := p.embedFS.Open(filePath) 247 + if err != nil { 248 + return fmt.Errorf("failed to read %s: %w", filename, err) 249 + } 250 + defer file.Close() 251 + 252 + markdownBytes, err := io.ReadAll(file) 246 253 if err != nil { 247 254 return fmt.Errorf("failed to read %s: %w", filename, err) 248 255 } ··· 263 270 func (p *Pages) PrivacyPolicy(w io.Writer, params PrivacyPolicyParams) error { 264 271 filename := "privacy.md" 265 272 filePath := filepath.Join("legal", filename) 266 - markdownBytes, err := os.ReadFile(filePath) 273 + 274 + file, err := p.embedFS.Open(filePath) 275 + if err != nil { 276 + return fmt.Errorf("failed to read %s: %w", filename, err) 277 + } 278 + defer file.Close() 279 + 280 + markdownBytes, err := io.ReadAll(file) 267 281 if err != nil { 268 282 return fmt.Errorf("failed to read %s: %w", filename, err) 269 283 }
+1 -1
legal/privacy.md appview/pages/legal/privacy.md
··· 1 1 # Privacy Policy 2 2 3 - **Last updated:** January 15, 2025 3 + **Last updated:** September 26, 2025 4 4 5 5 This Privacy Policy describes how Tangled ("we," "us," or "our") 6 6 collects, uses, and shares your personal information when you use our
+2 -2
legal/terms.md appview/pages/legal/terms.md
··· 1 1 # Terms of Service 2 2 3 - **Last updated:** January 15, 2025 3 + **Last updated:** September 26, 2025 4 4 5 5 Welcome to Tangled. These Terms of Service ("Terms") govern your access 6 6 to and use of the Tangled platform and services (the "Service") ··· 106 106 These terms are effective as of the last updated date shown above and 107 107 will remain in effect except with respect to any changes in their 108 108 provisions in the future, which will be in effect immediately after 109 - being posted on this page. 109 + being posted on this page.