Fixed favicon

This commit is contained in:
Pablu23
2024-02-26 19:17:17 +01:00
parent 8c5be57459
commit 87ec7aa1a8
5 changed files with 13 additions and 16 deletions

View File

@@ -43,8 +43,6 @@ func New(provider provider.Provider, db *database.Manager) *Server {
Mutex: &sync.Mutex{},
}
s.AddIco()
return &s
}
@@ -209,16 +207,6 @@ func (s *Server) AppendImagesToBuf(html string) ([]view.Image, error) {
return images, nil
}
//go:embed favicon.ico
var ico []byte
func (s *Server) AddIco() {
buf := bytes.NewBuffer(ico)
s.Mutex.Lock()
s.ImageBuffers["favicon.ico"] = buf
s.Mutex.Unlock()
}
func addFileToRam(url string) (*bytes.Buffer, error) {
// Get the data
resp, err := http.Get(url)