Refactor HTML creation
This commit is contained in:
parent
2e5140f669
commit
5da1cf0bd5
3 changed files with 70 additions and 104 deletions
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue