Refactor HTML creation

This commit is contained in:
Joakim Hellsén 2024-02-14 01:56:47 +01:00
commit 5da1cf0bd5
3 changed files with 70 additions and 104 deletions

View file

@ -1,32 +1,7 @@
package models
import (
"net/http"
"github.com/TheLovinator1/FeedVault/pkg/stats"
)
type TemplateData struct {
Title string
Description string
Keywords string
Author string
CanonicalURL string
FeedCount int
DatabaseSize string
Request *http.Request
ParseErrors []ParseResult
}
type ParseResult struct {
FeedURL string
Msg string
IsError bool
}
func (d *TemplateData) GetDatabaseSizeAndFeedCount() {
// TODO: Get the feed count from the database
// TODO: Add amount of entries
// TODO: Add amount of users
d.DatabaseSize = stats.GetDBSize()
}