cleanup and #ffffea

This commit is contained in:
Aaron Bieber 2022-12-04 20:24:56 -07:00
parent 7fd9a01a1a
commit 0eebffc039
No known key found for this signature in database
3 changed files with 9 additions and 3 deletions

View File

@ -332,8 +332,6 @@ func index(w http.ResponseWriter, r *http.Request) {
template.New("").Funcs(templateFuncs).ParseFS(templates, "templates/main.html"),
)
//tmpl = tmpl.Funcs(templateFuncs)
err = tmpl.ExecuteTemplate(w, "main.html", stuff)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)

View File

@ -158,12 +158,17 @@ func main() {
log.Println(err)
continue
}
defer resp.Body.Close()
body, err := io.ReadAll(resp.Body)
if err != nil {
log.Println(err)
continue
}
err = resp.Body.Close()
if err != nil {
log.Println(err)
continue
}
contentType := resp.Header.Get("Content-Type")
err = app.queries.AddIcon(app.ctx, data.AddIconParams{

View File

@ -1,6 +1,9 @@
<html lang="en">
<head>
<style>
html {
background-color: #ffffea;
}
.icon {
cursor: pointer;
padding: 10px;