phoenix/views/pages/settings.go
Ivan R. 5aa2cee5b1
chore: migrate to database/sql
Since I started simplifying, I decided to abandon ORM.

I won’t say that this makes much sense, everything works more or less as before.
Except that the size of the program has decreased slightly again, by about a megabyte.
2024-03-26 00:40:52 +05:00

21 lines
371 B
Go

package pages
import (
"net/http"
"github.com/ordinary-dev/phoenix/database"
)
func ShowSettings(w http.ResponseWriter, _ *http.Request) {
groups, err := database.GetGroupsWithLinks()
if err != nil {
ShowError(w, http.StatusInternalServerError, err)
return
}
Render("settings.html.tmpl", w, map[string]any{
"title": "Settings",
"groups": groups,
})
}